Make Unicode const strings static so they are not copied to the stack
each time we enter the function.
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 6347057..be68678 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -424,13 +424,13 @@
HKEY hKey;
LONG r;
DWORD dp;
- const WCHAR szDisplayName[] = { 'D','i','s','p','l','a','y','N','a','m','e', 0 };
- const WCHAR szType[] = {'T','y','p','e',0};
- const WCHAR szStart[] = {'S','t','a','r','t',0};
- const WCHAR szError[] = {'E','r','r','o','r','C','o','n','t','r','o','l', 0};
- const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
- const WCHAR szGroup[] = {'G','r','o','u','p',0};
- const WCHAR szDependencies[] = { 'D','e','p','e','n','d','e','n','c','i','e','s',0};
+ static const WCHAR szDisplayName[] = { 'D','i','s','p','l','a','y','N','a','m','e', 0 };
+ static const WCHAR szType[] = {'T','y','p','e',0};
+ static const WCHAR szStart[] = {'S','t','a','r','t',0};
+ static const WCHAR szError[] = {'E','r','r','o','r','C','o','n','t','r','o','l', 0};
+ static const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
+ static const WCHAR szGroup[] = {'G','r','o','u','p',0};
+ static const WCHAR szDependencies[] = { 'D','e','p','e','n','d','e','n','c','i','e','s',0};
FIXME("%p %s %s\n", hSCManager,
debugstr_w(lpServiceName), debugstr_w(lpDisplayName));
@@ -894,15 +894,15 @@
LPQUERY_SERVICE_CONFIGW lpServiceConfig,
DWORD cbBufSize, LPDWORD pcbBytesNeeded)
{
- const WCHAR szDisplayName[] = {
+ static const WCHAR szDisplayName[] = {
'D','i','s','p','l','a','y','N','a','m','e', 0 };
- const WCHAR szType[] = {'T','y','p','e',0};
- const WCHAR szStart[] = {'S','t','a','r','t',0};
- const WCHAR szError[] = {
+ static const WCHAR szType[] = {'T','y','p','e',0};
+ static const WCHAR szStart[] = {'S','t','a','r','t',0};
+ static const WCHAR szError[] = {
'E','r','r','o','r','C','o','n','t','r','o','l', 0};
- const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
- const WCHAR szGroup[] = {'G','r','o','u','p',0};
- const WCHAR szDependencies[] = {
+ static const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
+ static const WCHAR szGroup[] = {'G','r','o','u','p',0};
+ static const WCHAR szDependencies[] = {
'D','e','p','e','n','d','e','n','c','i','e','s',0};
LONG r;
DWORD type, val, sz, total, n;
diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c
index a8fe594..c47d026 100644
--- a/dlls/commdlg/printdlg.c
+++ b/dlls/commdlg/printdlg.c
@@ -1866,8 +1866,8 @@
{
HRSRC hResInfo;
HGLOBAL hDlgTmpl;
- const WCHAR xpsetup[] = { 'P','R','I','N','T','3','2','_','S','E','T','U','P',0};
- const WCHAR xprint[] = { 'P','R','I','N','T','3','2',0};
+ static const WCHAR xpsetup[] = { 'P','R','I','N','T','3','2','_','S','E','T','U','P',0};
+ static const WCHAR xprint[] = { 'P','R','I','N','T','3','2',0};
if (lppd->Flags & PD_PRINTSETUP) {
if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) {
@@ -2875,7 +2875,7 @@
/* short cut exit, just return default values */
if (setupdlg->Flags & PSD_RETURNDEFAULT) {
- const WCHAR a4[] = {'A','4',0};
+ static const WCHAR a4[] = {'A','4',0};
setupdlg->hDevMode = pdlg.hDevMode;
setupdlg->hDevNames = pdlg.hDevNames;
/* FIXME: Just return "A4" for now. */
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
index 98684ac..f069949 100644
--- a/dlls/crypt32/main.c
+++ b/dlls/crypt32/main.c
@@ -91,16 +91,16 @@
static LONG CRYPT_SIPWriteFunction( LPGUID guid, LPCWSTR szKey,
LPCWSTR szDll, LPCWSTR szFunction )
{
- const WCHAR szOID[] = {
+ static const WCHAR szOID[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'C','r','y','p','t','o','g','r','a','p','h','y','\\',
'O','I','D','\\',
'E','n','c','o','d','i','n','g','T','y','p','e',' ','0','\\',
'C','r','y','p','t','S','I','P','D','l','l', 0 };
- const WCHAR szBackSlash[] = { '\\', 0 };
- const WCHAR szDllName[] = { 'D','l','l',0 };
- const WCHAR szFuncName[] = { 'F','u','n','c','N','a','m','e',0 };
+ static const WCHAR szBackSlash[] = { '\\', 0 };
+ static const WCHAR szDllName[] = { 'D','l','l',0 };
+ static const WCHAR szFuncName[] = { 'F','u','n','c','N','a','m','e',0 };
WCHAR szFullKey[ 0x100 ];
LONG r;
HKEY hKey;
@@ -134,19 +134,19 @@
BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
{
- const WCHAR szCreate[] = {
+ static const WCHAR szCreate[] = {
'C','r','e','a','t','e',
'I','n','d','i','r','e','c','t','D','a','t','a',0};
- const WCHAR szGetSigned[] = {
+ static const WCHAR szGetSigned[] = {
'G','e','t','S','i','g','n','e','d','D','a','t','a','M','s','g',0};
- const WCHAR szIsMyFile[] = {
+ static const WCHAR szIsMyFile[] = {
'I','s','M','y','F','i','l','e','T','y','p','e', 0 };
- const WCHAR szPutSigned[] = {
+ static const WCHAR szPutSigned[] = {
'P','u','t','S','i','g','n','e','d','D','a','t','a','M','s','g',0};
- const WCHAR szRemoveSigned[] = {
+ static const WCHAR szRemoveSigned[] = {
'R','e','m','o','v','e',
'S','i','g','n','e','d','D','a','t','a','M','s','g',0};
- const WCHAR szVerify[] = {
+ static const WCHAR szVerify[] = {
'V','e','r','i','f','y',
'I','n','d','i','r','e','c','t','D','a','t','a',0};
@@ -214,9 +214,9 @@
LPCSTR pszOID, LPCWSTR pwszDll, LPCSTR pszOverrideFuncName)
{
LONG r;
- const char szOID[] = "Software\\Microsoft\\Cryptography\\OID";
- const char szType1[] = "EncodingType 1";
- const WCHAR szDllName[] = { 'D','l','l',0 };
+ static const char szOID[] = "Software\\Microsoft\\Cryptography\\OID";
+ static const char szType1[] = "EncodingType 1";
+ static const WCHAR szDllName[] = { 'D','l','l',0 };
HKEY hKey;
LPSTR szKey;
UINT len;
diff --git a/dlls/devenum/devenum_main.c b/dlls/devenum/devenum_main.c
index 946f102..fbccce1 100644
--- a/dlls/devenum/devenum_main.c
+++ b/dlls/devenum/devenum_main.c
@@ -305,8 +305,8 @@
HKEY hkeyInproc32;
HKEY hkeyInstance = NULL;
int i;
- const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
- const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
+ static const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
+ static const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
res = RegOpenKeyW(HKEY_CLASSES_ROOT, clsid_keyname, &hkeyClsid)
== ERROR_SUCCESS ? S_OK : E_FAIL;
diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c
index 62f5445..22f8857 100644
--- a/dlls/devenum/mediacatenum.c
+++ b/dlls/devenum/mediacatenum.c
@@ -587,7 +587,7 @@
{
ICOM_THIS(MediaCatMoniker, iface);
WCHAR wszBuffer[MAX_PATH];
- const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
+ static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
LONG received = sizeof(wszFriendlyName);
TRACE("(%p, %p, %p)\n", pbc, pmkToLeft, ppszDisplayName);
diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c
index b6b1798..79e3633 100644
--- a/dlls/gdi/freetype.c
+++ b/dlls/gdi/freetype.c
@@ -755,8 +755,8 @@
Family *family;
Face *face;
WCHAR *file;
- const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'};
- const WCHAR spaceW[] = {' ', '\0'};
+ static const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'};
+ static const WCHAR spaceW[] = {' ', '\0'};
char *path;
if(RegCreateKeyExW(HKEY_LOCAL_MACHINE, is_win9x() ? win9x_font_reg_key : winnt_font_reg_key,
diff --git a/dlls/kernel/comm.c b/dlls/kernel/comm.c
index d1c66fa..6a8ccbe 100644
--- a/dlls/kernel/comm.c
+++ b/dlls/kernel/comm.c
@@ -180,7 +180,7 @@
*/
static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
{
- const WCHAR comW[] = {'C','O','M',0};
+ static const WCHAR comW[] = {'C','O','M',0};
/* The device control string may optionally start with "COMx" followed
by an optional ':' and spaces. */
@@ -272,7 +272,7 @@
static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
{
DWORD temp;
- const WCHAR stopbits15W[] = {'1','.','5',0};
+ static const WCHAR stopbits15W[] = {'1','.','5',0};
if(!strncmpW(stopbits15W, ptr, 3))
{
@@ -297,8 +297,8 @@
static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
{
- const WCHAR onW[] = {'o','n',0};
- const WCHAR offW[] = {'o','f','f',0};
+ static const WCHAR onW[] = {'o','n',0};
+ static const WCHAR offW[] = {'o','f','f',0};
if(!strncmpiW(onW, ptr, 2))
{
@@ -425,17 +425,17 @@
{
DWORD temp;
BOOL baud = FALSE, stop = FALSE;
- const WCHAR baudW[] = {'b','a','u','d','=',0};
- const WCHAR parityW[] = {'p','a','r','i','t','y','=',0};
- const WCHAR dataW[] = {'d','a','t','a','=',0};
- const WCHAR stopW[] = {'s','t','o','p','=',0};
- const WCHAR toW[] = {'t','o','=',0};
- const WCHAR xonW[] = {'x','o','n','=',0};
- const WCHAR odsrW[] = {'o','d','s','r','=',0};
- const WCHAR octsW[] = {'o','c','t','s','=',0};
- const WCHAR dtrW[] = {'d','t','r','=',0};
- const WCHAR rtsW[] = {'r','t','s','=',0};
- const WCHAR idsrW[] = {'i','d','s','r','=',0};
+ static const WCHAR baudW[] = {'b','a','u','d','=',0};
+ static const WCHAR parityW[] = {'p','a','r','i','t','y','=',0};
+ static const WCHAR dataW[] = {'d','a','t','a','=',0};
+ static const WCHAR stopW[] = {'s','t','o','p','=',0};
+ static const WCHAR toW[] = {'t','o','=',0};
+ static const WCHAR xonW[] = {'x','o','n','=',0};
+ static const WCHAR odsrW[] = {'o','d','s','r','=',0};
+ static const WCHAR octsW[] = {'o','c','t','s','=',0};
+ static const WCHAR dtrW[] = {'d','t','r','=',0};
+ static const WCHAR rtsW[] = {'r','t','s','=',0};
+ static const WCHAR idsrW[] = {'i','d','s','r','=',0};
while(*device)
{
@@ -2311,8 +2311,8 @@
{
LPDCB lpdcb = &(lpCC->dcb);
WCHAR temp[40];
- const WCHAR comW[] = {'C','O','M',0};
- const WCHAR formatW[] = {'C','O','M','%','c',':','3','8','4','0','0',',','n',',','8',',','1',0};
+ static const WCHAR comW[] = {'C','O','M',0};
+ static const WCHAR formatW[] = {'C','O','M','%','c',':','3','8','4','0','0',',','n',',','8',',','1',0};
if (strncmpiW(lpszName,comW,3)) {
ERR("not implemented for <%s>\n", debugstr_w(lpszName));
diff --git a/dlls/kernel/format_msg.c b/dlls/kernel/format_msg.c
index 50ef0b6..6df1160 100644
--- a/dlls/kernel/format_msg.c
+++ b/dlls/kernel/format_msg.c
@@ -61,8 +61,8 @@
* Yes, ANSI strings in win32 resources. Go figure.
*/
-const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0 };
-const WCHAR FMTWSTR[] = { '%','s',0 };
+static const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0 };
+static const WCHAR FMTWSTR[] = { '%','s',0 };
/**********************************************************************
* load_messageW (internal)
diff --git a/dlls/kernel/locale.c b/dlls/kernel/locale.c
index a0a78ba..ed9ca0c 100644
--- a/dlls/kernel/locale.c
+++ b/dlls/kernel/locale.c
@@ -1060,7 +1060,7 @@
BOOL WINAPI SetLocaleInfoW( LCID lcid, LCTYPE lctype, LPCWSTR data )
{
const WCHAR *value;
- const WCHAR intlW[] = {'i','n','t','l',0 };
+ static const WCHAR intlW[] = {'i','n','t','l',0 };
UNICODE_STRING valueW;
NTSTATUS status;
HKEY hkey;
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c
index bf38f55..e2c1386 100644
--- a/dlls/mshtml/main.c
+++ b/dlls/mshtml/main.c
@@ -65,11 +65,11 @@
DWORD r, type;
BOOL ret = FALSE;
HKEY hkey;
- const WCHAR szPre[] = {
+ static const WCHAR szPre[] = {
'S','o','f','t','w','a','r','e','\\',
'C','l','a','s','s','e','s','\\',
'C','L','S','I','D','\\',0 };
- const WCHAR szPost[] = {
+ static const WCHAR szPost[] = {
'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0 };
WCHAR szRegPath[(sizeof(szPre)+sizeof(szPost))/sizeof(WCHAR)+40];
diff --git a/dlls/msi/create.c b/dlls/msi/create.c
index 5e9a0bf..704018d 100644
--- a/dlls/msi/create.c
+++ b/dlls/msi/create.c
@@ -61,8 +61,8 @@
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
create_col_info *col;
UINT r, nField, row, table_val, column_val;
- const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
- const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+ static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
+ static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
MSIVIEW *tv = NULL;
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
diff --git a/dlls/msi/insert.c b/dlls/msi/insert.c
index 6836987..5a36a6f 100644
--- a/dlls/msi/insert.c
+++ b/dlls/msi/insert.c
@@ -63,8 +63,8 @@
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
create_col_info *col;
UINT r, nField, row, table_val, column_val;
- const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
- const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+ static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
+ static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
MSIVIEW *tv = NULL;
TRACE("%p Table %s (%s)\n", iv, debugstr_w(iv->name),
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 6db12e0..d4f4997 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -45,16 +45,16 @@
*/
#define LPCTSTR LPCWSTR
-const WCHAR szInstaller[] = {
+static const WCHAR szInstaller[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'I','n','s','t','a','l','l','e','r',0 };
-const WCHAR szFeatures[] = {
+static const WCHAR szFeatures[] = {
'F','e','a','t','u','r','e','s',0 };
-const WCHAR szComponents[] = {
+static const WCHAR szComponents[] = {
'C','o','m','p','o','n','e','n','t','s',0 };
/*
@@ -286,13 +286,13 @@
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
{
- const WCHAR szKey[] = {
+ static const WCHAR szKey[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'U','n','i','n','s','t','a','l','l',0 };
- const WCHAR szLocalPackage[] = {
+ static const WCHAR szLocalPackage[] = {
'L','o','c','a','l','P','a','c','k','a','g','e', 0
};
LPWSTR path = NULL;
@@ -879,8 +879,8 @@
/* FIXME: Cleanup */
}
/*
- const WCHAR szMSIServerSvc[] = { 'M','S','I','S','e','r','v','e','r',0 };
- const WCHAR szNull[] = { 0 };
+ static const WCHAR szMSIServerSvc[] = { 'M','S','I','S','e','r','v','e','r',0 };
+ static const WCHAR szNull[] = { 0 };
if (!strcmpW(lpServiceName, szMSIServerSvc)) {
hKey = CreateServiceW(hSCManager,
szMSIServerSvc,
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index cf67da2..e5bf28e 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -314,7 +314,7 @@
MSIRECORD *rec;
UINT len=0, ret;
WCHAR buffer[16];
- const WCHAR szFormat[] = { '%','d',0 };
+ static const WCHAR szFormat[] = { '%','d',0 };
TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue);
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index fe14c85..0acf9f8 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -35,7 +35,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi);
-const WCHAR szSumInfo[] = { 5 ,'S','u','m','m','a','r','y',
+static const WCHAR szSumInfo[] = { 5 ,'S','u','m','m','a','r','y',
'I','n','f','o','r','m','a','t','i','o','n',0 };
static void MSI_CloseSummaryInfo( VOID *arg )
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 8220f11..cdb8825 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -544,9 +544,9 @@
HRESULT init_string_table( IStorage *stg )
{
HRESULT r;
- const WCHAR szStringData[] = {
+ static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
- const WCHAR szStringPool[] = {
+ static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
USHORT zero[2] = { 0, 0 };
ULONG count = 0;
@@ -593,9 +593,9 @@
USHORT *pool;
UINT r, ret = ERROR_FUNCTION_FAILED, datasize = 0, poolsize = 0;
DWORD i, count, offset, len, n;
- const WCHAR szStringData[] = {
+ static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
- const WCHAR szStringPool[] = {
+ static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
if( db->strings )
@@ -643,9 +643,9 @@
{
UINT i, count, datasize, poolsize, sz, used, r;
UINT ret = ERROR_FUNCTION_FAILED;
- const WCHAR szStringData[] = {
+ static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
- const WCHAR szStringPool[] = {
+ static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
CHAR *data = NULL;
USHORT *pool = NULL;
@@ -731,13 +731,13 @@
}
/* information for default tables */
-const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
-const WCHAR szTable[] = { 'T','a','b','l','e',0 };
-const WCHAR szName[] = { 'N','a','m','e',0 };
-const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
-const WCHAR szColumn[] = { 'C','o','l','u','m','n',0 };
-const WCHAR szNumber[] = { 'N','u','m','b','e','r',0 };
-const WCHAR szType[] = { 'T','y','p','e',0 };
+static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
+static const WCHAR szTable[] = { 'T','a','b','l','e',0 };
+static const WCHAR szName[] = { 'N','a','m','e',0 };
+static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+static const WCHAR szColumn[] = { 'C','o','l','u','m','n',0 };
+static const WCHAR szNumber[] = { 'N','u','m','b','e','r',0 };
+static const WCHAR szType[] = { 'T','y','p','e',0 };
struct standard_table {
LPCWSTR tablename;
@@ -809,7 +809,7 @@
{
UINT r, i, n=0, table_id, count, maxcount = *sz;
MSITABLE *table = NULL;
- const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+ static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
/* first check if there is a default table with that name */
r = get_defaulttablecolumns( szTableName, colinfo, sz );
@@ -877,8 +877,8 @@
/* try to find the table name in the _Tables table */
BOOL TABLE_Exists( MSIDATABASE *db, LPWSTR name )
{
- const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
- const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+ static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
+ static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
UINT r, table_id = 0, i, count;
MSITABLE *table = NULL;
diff --git a/dlls/netapi32/access.c b/dlls/netapi32/access.c
index 28f7949..458a175 100644
--- a/dlls/netapi32/access.c
+++ b/dlls/netapi32/access.c
@@ -33,9 +33,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
-const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
+static const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
'o','r',0};
-const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
+static const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
/************************************************************
* NETAPI_ValidateServername
@@ -277,7 +277,7 @@
*/
void ACCESS_QueryAdminDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD pdwSize)
{
- const WCHAR sAdminUserName[] = {
+ static const WCHAR sAdminUserName[] = {
'A','d','m','i','n','i','s','t','r','a','t','o','r',0};
/* sizes of the field buffers in WCHARS */
@@ -316,7 +316,7 @@
*/
void ACCESS_QueryGuestDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD pdwSize)
{
- const WCHAR sGuestUserName[] = {
+ static const WCHAR sGuestUserName[] = {
'G','u','e','s','t',0 };
/* sizes of the field buffers in WCHARS */
diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index 473dc0c..4d76809 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -31,15 +31,15 @@
WCHAR user_name[UNLEN + 1];
WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1];
-const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
+static const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
'o','r',0};
-const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
-const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ',
+static const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
+static const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ',
'U','s','e','r',0};
-const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0};
-const WCHAR sInvalidName[] = {'\\',0};
-const WCHAR sInvalidName2[] = {'\\','\\',0};
-const WCHAR sEmptyStr[] = { 0 };
+static const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0};
+static const WCHAR sInvalidName[] = {'\\',0};
+static const WCHAR sInvalidName2[] = {'\\','\\',0};
+static const WCHAR sEmptyStr[] = { 0 };
static NET_API_STATUS (WINAPI *pNetApiBufferFree)(LPVOID)=NULL;
static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL;
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index d8de067..62852cb 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -4927,7 +4927,7 @@
/* FIXME: This is wrong, but how do you find that out? */
if (pBstrDllName) {
- const WCHAR oleaut32W[] = {'O','L','E','A','U','T','3','2','.','D','L','L',0};
+ static const WCHAR oleaut32W[] = {'O','L','E','A','U','T','3','2','.','D','L','L',0};
*pBstrDllName = SysAllocString(oleaut32W);
}
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index aeab7cc..d3fe65b 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -209,7 +209,7 @@
HKEY hkeyMajor;
WCHAR wszMajorKeyName[CHARS_IN_GUID];
DWORD dwKeyNameLength = sizeof(wszMajorKeyName) / sizeof(wszMajorKeyName[0]);
- const WCHAR wszExtensions[] = {'E','x','t','e','n','s','i','o','n','s',0};
+ static const WCHAR wszExtensions[] = {'E','x','t','e','n','s','i','o','n','s',0};
if (RegEnumKeyExW(hkeyMediaType, indexMajor, wszMajorKeyName, &dwKeyNameLength, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
break;
@@ -251,7 +251,7 @@
LPWSTR wszPatternString = HeapAlloc(GetProcessHeap(), 0, maxValueLen);
DWORD dwValueNameLen = sizeof(wszValueName) / sizeof(wszValueName[0]); /* remember this is in chars */
DWORD dwDataLen = maxValueLen; /* remember this is in bytes */
- const WCHAR wszSourceFilter[] = {'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
+ static const WCHAR wszSourceFilter[] = {'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
LONG temp;
if ((temp = RegEnumValueW(hkeyMinor, indexValue, wszValueName, &dwValueNameLen, NULL, &dwType, (LPBYTE)wszPatternString, &dwDataLen)) != ERROR_SUCCESS)
diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c
index d35d5e9..2eba2e7 100644
--- a/dlls/richedit/richedit.c
+++ b/dlls/richedit/richedit.c
@@ -95,7 +95,7 @@
INT RICHEDIT_GetSelText(HWND hwnd,LPSTR lpstrBuffer);
-const WCHAR RichEditInfoStr[] = { '_','R','T','F','_','I','n','f','o', 0 };
+static const WCHAR RichEditInfoStr[] = { '_','R','T','F','_','I','n','f','o', 0 };
typedef struct _RTFControl_info
{
diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c
index bccbeed..0854695 100644
--- a/dlls/shdocvw/shdocvw_main.c
+++ b/dlls/shdocvw/shdocvw_main.c
@@ -69,11 +69,11 @@
DWORD r, type;
BOOL ret = FALSE;
HKEY hkey;
- const WCHAR szPre[] = {
+ static const WCHAR szPre[] = {
'S','o','f','t','w','a','r','e','\\',
'C','l','a','s','s','e','s','\\',
'C','L','S','I','D','\\',0 };
- const WCHAR szPost[] = {
+ static const WCHAR szPost[] = {
'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0 };
WCHAR szRegPath[(sizeof(szPre)+sizeof(szPost))/sizeof(WCHAR)+40];
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index a7f0181..5432bc8 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -439,7 +439,7 @@
return FALSE;
}
-static WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
+static const WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
/*************************************************************************
* SHBrowseForFolderA [SHELL32.@]
diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c
index 21f7572..5c00c8b 100644
--- a/dlls/shell32/classes.c
+++ b/dlls/shell32/classes.c
@@ -265,7 +265,7 @@
*
* Gets the name of a registred class
*/
-static WCHAR swEmpty[] = {0};
+static const WCHAR swEmpty[] = {0};
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
{
diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index 55a4cd1..832a830 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -249,7 +249,7 @@
static BOOL StartLinkProcessor( LPCOLESTR szLink )
{
- const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',
+ static const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',
' ','-','r',' ','"','%','s','"',0 };
LONG len;
LPWSTR buffer;
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c
index e25a986..f5d6561 100644
--- a/dlls/urlmon/umon.c
+++ b/dlls/urlmon/umon.c
@@ -1061,9 +1061,9 @@
DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags,
LPWSTR* ppwzMimeOut, DWORD dwReserved)
{
- const WCHAR szBinaryMime[] = {'a','p','p','l','i','c','a','t','i','o','n','/','o','c','t','e','t','-','s','t','r','e','a','m','\0'};
- const WCHAR szTextMime[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
- const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
+ static const WCHAR szBinaryMime[] = {'a','p','p','l','i','c','a','t','i','o','n','/','o','c','t','e','t','-','s','t','r','e','a','m','\0'};
+ static const WCHAR szTextMime[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
+ static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
WCHAR szTmpMime[256];
LPCWSTR mimeType = NULL;
HKEY hKey = NULL;
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
index 2ffb402..a68d0be 100644
--- a/dlls/uxtheme/system.c
+++ b/dlls/uxtheme/system.c
@@ -191,13 +191,13 @@
*/
void UXTHEME_InitSystem(HINSTANCE hInst)
{
- const WCHAR szWindowTheme[] = {
+ static const WCHAR szWindowTheme[] = {
'u','x','_','t','h','e','m','e','\0'
};
- const WCHAR szSubAppName[] = {
+ static const WCHAR szSubAppName[] = {
'u','x','_','s','u','b','a','p','p','\0'
};
- const WCHAR szSubIdList[] = {
+ static const WCHAR szSubIdList[] = {
'u','x','_','s','u','b','i','d','l','s','t','\0'
};
diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c
index 8102237..e7f20ca 100644
--- a/dlls/wininet/cookie.c
+++ b/dlls/wininet/cookie.c
@@ -343,11 +343,11 @@
* It'd be nice to know what exactly is going on, M$ tracking users? Does this need
* to be unique? Should I generate a random number here? etc.
*/
- const WCHAR TrackingString[] = {
+ static const WCHAR TrackingString[] = {
'M','t','r','x','T','r','a','c','k','i','n','g','I','D','=',
'0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5',
'6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1', 0 };
- const WCHAR szps[] = { '%','s',0 };
+ static const WCHAR szps[] = { '%','s',0 };
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
lpCookieData, lpdwSize);
@@ -377,8 +377,8 @@
}
while (thisCookie)
{
- const WCHAR szsc[] = { ';',' ',0 };
- const WCHAR szpseq[] = { '%','s','=','%','s',0 };
+ static const WCHAR szsc[] = { ';',' ',0 };
+ static const WCHAR szpseq[] = { '%','s','=','%','s',0 };
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq,
thisCookie->lpCookieName,
diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c
index 60d74b7..9ca2290 100644
--- a/dlls/wininet/dialogs.c
+++ b/dlls/wininet/dialogs.c
@@ -93,7 +93,7 @@
{
LPWSTR p, q;
DWORD index;
- const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
+ static const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
/* extract the Realm from the proxy response and show it */
index = 0;
@@ -136,7 +136,8 @@
DWORD r, dwMagic = 19;
UINT r_len, u_len;
WORD sz;
- const WCHAR szColon[] = { ':',0 }, szbs[] = { '/', 0 };
+ static const WCHAR szColon[] = { ':',0 };
+ static const WCHAR szbs[] = { '/', 0 };
hUserItem = GetDlgItem( hdlg, IDC_USERNAME );
hPassItem = GetDlgItem( hdlg, IDC_PASSWORD );
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 936b1bb..a189ec7 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -55,11 +55,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
-const WCHAR g_szHttp[] = {' ','H','T','T','P','/','1','.','0',0 };
-const WCHAR g_szHost[] = {'\r','\n','H','o','s','t',':',' ',0 };
-const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
-const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
-const WCHAR g_szUserAgent[] = {'U','s','e','r','-','A','g','e','n','t',0};
+static const WCHAR g_szHttp[] = {' ','H','T','T','P','/','1','.','0',0 };
+static const WCHAR g_szHost[] = {'\r','\n','H','o','s','t',':',' ',0 };
+static const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
+static const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
+static const WCHAR g_szUserAgent[] = {'U','s','e','r','-','A','g','e','n','t',0};
#define HTTPHEADER g_szHttp
@@ -470,8 +470,8 @@
{
UINT len;
LPWSTR in, out;
- const WCHAR szBasic[] = {'B','a','s','i','c',' ',0};
- const WCHAR szColon[] = {':',0};
+ static const WCHAR szBasic[] = {'B','a','s','i','c',' ',0};
+ static const WCHAR szColon[] = {':',0};
len = lstrlenW( username ) + 1 + lstrlenW ( password ) + 1;
in = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
@@ -504,7 +504,7 @@
{
HTTPHEADERW hdr;
INT index;
- const WCHAR szProxyAuthorization[] = {
+ static const WCHAR szProxyAuthorization[] = {
'P','r','o','x','y','-','A','u','t','h','o','r','i','z','a','t','i','o','n',0 };
hdr.lpszValue = HTTP_EncodeBasicAuth( username, password );
@@ -606,7 +606,7 @@
LPWSTR lpszUrl = NULL;
DWORD nCookieSize;
HINTERNET handle;
- const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0};
+ static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0};
DWORD len;
TRACE("--> \n");
@@ -669,7 +669,7 @@
if (NULL == lpszVerb)
{
- const WCHAR szGet[] = {'G','E','T',0};
+ static const WCHAR szGet[] = {'G','E','T',0};
lpwhr->lpszVerb = WININET_strdupW(szGet);
}
else if (strlenW(lpszVerb))
@@ -697,7 +697,7 @@
if (hIC->lpszAgent)
{
WCHAR *agent_header;
- const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0 };
+ static const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0 };
len = strlenW(hIC->lpszAgent) + strlenW(user_agent);
agent_header = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
@@ -715,8 +715,8 @@
if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize))
{
int cnt = 0;
- const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0};
- const WCHAR szcrlf[] = {'\r','\n',0};
+ static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0};
+ static const WCHAR szcrlf[] = {'\r','\n',0};
lpszCookies = HeapAlloc(GetProcessHeap(), 0, (nCookieSize + 1 + 8)*sizeof(WCHAR));
@@ -788,9 +788,9 @@
LPHTTPHEADERW lphttpHdr = NULL;
BOOL bSuccess = FALSE;
LPWININETHTTPREQW lpwhr;
- const WCHAR szFmt[] = { '%','s',':',' ','%','s','%','s',0 };
- const WCHAR szcrlf[] = { '\r','\n',0 };
- const WCHAR sznul[] = { 0 };
+ static const WCHAR szFmt[] = { '%','s',':',' ','%','s','%','s',0 };
+ static const WCHAR szcrlf[] = { '\r','\n',0 };
+ static const WCHAR sznul[] = { 0 };
if (TRACE_ON(wininet)) {
#define FE(x) { x, #x }
@@ -1418,12 +1418,12 @@
do
{
- const WCHAR szSlash[] = { '/',0 };
- const WCHAR szSpace[] = { ' ',0 };
- const WCHAR szHttp[] = { 'h','t','t','p',':','/','/', 0 };
- const WCHAR szcrlf[] = {'\r','\n', 0};
- const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0};
- const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 };
+ static const WCHAR szSlash[] = { '/',0 };
+ static const WCHAR szSpace[] = { ' ',0 };
+ static const WCHAR szHttp[] = { 'h','t','t','p',':','/','/', 0 };
+ static const WCHAR szcrlf[] = {'\r','\n', 0};
+ static const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0};
+ static const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 };
TRACE("Going to url %s %s\n", debugstr_w(lpwhr->lpszHostName), debugstr_w(lpwhr->lpszPath));
loop_next = FALSE;
@@ -1539,7 +1539,7 @@
{
if (lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST)
{
- const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
+ static const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
cnt += sprintfW(requestString + cnt, szFmt,
lpwhr->StdHeaders[i].lpszField, lpwhr->StdHeaders[i].lpszValue);
TRACE("Adding header %s (%s)\n",
@@ -1553,7 +1553,7 @@
{
if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST)
{
- const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
+ static const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
cnt += sprintfW(requestString + cnt, szFmt,
lpwhr->pCustHeaders[i].lpszField, lpwhr->pCustHeaders[i].lpszValue);
TRACE("Adding custom header %s (%s)\n",
@@ -1564,7 +1564,7 @@
if (lpwhr->lpszHostName)
{
- const WCHAR szFmt[] = { '%','s','%','s',0 };
+ static const WCHAR szFmt[] = { '%','s','%','s',0 };
cnt += sprintfW(requestString + cnt, szFmt, HTTPHOSTHEADER, lpwhr->lpszHostName);
}
@@ -1657,7 +1657,7 @@
{
LPHTTPHEADERW setCookieHeader;
int nPosStart = 0, nPosEnd = 0, len;
- const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
+ static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
setCookieHeader = &lpwhr->pCustHeaders[CustHeaderIndex];
@@ -1677,7 +1677,7 @@
/* fixme: not case sensitive, strcasestr is gnu only */
int nDomainPosEnd = 0;
int nDomainPosStart = 0, nDomainLength = 0;
- const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0};
+ static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0};
LPWSTR lpszDomain = strstrW(&setCookieHeader->lpszValue[nPosEnd], szDomain);
if (lpszDomain)
{ /* they have specified their own domain, lets use it */
@@ -1951,8 +1951,8 @@
BOOL bSuccess = FALSE;
INT rc = 0;
WCHAR value[MAX_FIELD_VALUE_LEN], field[MAX_FIELD_LEN];
- const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
- const WCHAR szHttp[] = { 'H','T','T','P',0 };
+ static const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
+ static const WCHAR szHttp[] = { 'H','T','T','P',0 };
char bufferA[MAX_REPLY_LEN];
TRACE("-->\n");
@@ -2086,32 +2086,32 @@
INT HTTP_GetStdHeaderIndex(LPCWSTR lpszField)
{
INT index = -1;
- const WCHAR szContentLength[] = {
+ static const WCHAR szContentLength[] = {
'C','o','n','t','e','n','t','-','L','e','n','g','t','h',0};
- const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
- const WCHAR szContentType[] = {
+ static const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
+ static const WCHAR szContentType[] = {
'C','o','n','t','e','n','t','-','T','y','p','e',0};
- const WCHAR szLastModified[] = {
+ static const WCHAR szLastModified[] = {
'L','a','s','t','-','M','o','d','i','f','i','e','d',0};
- const WCHAR szLocation[] = {'L','o','c','a','t','i','o','n',0};
- const WCHAR szAccept[] = {'A','c','c','e','p','t',0};
- const WCHAR szReferer[] = { 'R','e','f','e','r','e','r',0};
- const WCHAR szContentTrans[] = { 'C','o','n','t','e','n','t','-',
+ static const WCHAR szLocation[] = {'L','o','c','a','t','i','o','n',0};
+ static const WCHAR szAccept[] = {'A','c','c','e','p','t',0};
+ static const WCHAR szReferer[] = { 'R','e','f','e','r','e','r',0};
+ static const WCHAR szContentTrans[] = { 'C','o','n','t','e','n','t','-',
'T','r','a','n','s','f','e','r','-','E','n','c','o','d','i','n','g',0};
- const WCHAR szDate[] = { 'D','a','t','e',0};
- const WCHAR szServer[] = { 'S','e','r','v','e','r',0};
- const WCHAR szConnection[] = { 'C','o','n','n','e','c','t','i','o','n',0};
- const WCHAR szETag[] = { 'E','T','a','g',0};
- const WCHAR szAcceptRanges[] = {
+ static const WCHAR szDate[] = { 'D','a','t','e',0};
+ static const WCHAR szServer[] = { 'S','e','r','v','e','r',0};
+ static const WCHAR szConnection[] = { 'C','o','n','n','e','c','t','i','o','n',0};
+ static const WCHAR szETag[] = { 'E','T','a','g',0};
+ static const WCHAR szAcceptRanges[] = {
'A','c','c','e','p','t','-','R','a','n','g','e','s',0 };
- const WCHAR szExpires[] = { 'E','x','p','i','r','e','s',0 };
- const WCHAR szMimeVersion[] = {
+ static const WCHAR szExpires[] = { 'E','x','p','i','r','e','s',0 };
+ static const WCHAR szMimeVersion[] = {
'M','i','m','e','-','V','e','r','s','i','o','n', 0};
- const WCHAR szPragma[] = { 'P','r','a','g','m','a', 0};
- const WCHAR szCacheControl[] = {
+ static const WCHAR szPragma[] = { 'P','r','a','g','m','a', 0};
+ static const WCHAR szCacheControl[] = {
'C','a','c','h','e','-','C','o','n','t','r','o','l',0};
- const WCHAR szUserAgent[] = { 'U','s','e','r','-','A','g','e','n','t',0};
- const WCHAR szProxyAuth[] = {
+ static const WCHAR szUserAgent[] = { 'U','s','e','r','-','A','g','e','n','t',0};
+ static const WCHAR szProxyAuth[] = {
'P','r','o','x','y','-',
'A','u','t','h','e','n','t','i','c','a','t','e', 0};
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index fb1c1c9..c6babfc 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -342,7 +342,7 @@
DWORD r, keytype, len, enabled;
LPSTR lpszInternetSettings =
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings";
- const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 };
+ static const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 };
r = RegOpenKeyA(HKEY_CURRENT_USER, lpszInternetSettings, &key);
if ( r != ERROR_SUCCESS )
@@ -361,7 +361,7 @@
if( (r == ERROR_SUCCESS) && len && (keytype == REG_SZ) )
{
LPWSTR szProxy, p;
- const WCHAR szHttp[] = {'h','t','t','p','=',0};
+ static const WCHAR szHttp[] = {'h','t','t','p','=',0};
szProxy=HeapAlloc( GetProcessHeap(), 0, len );
RegQueryValueExW( key, szProxyServer, NULL, &keytype,
@@ -1070,14 +1070,14 @@
INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, INT nMaxCmp)
{
INTERNET_SCHEME iScheme=INTERNET_SCHEME_UNKNOWN;
- const WCHAR lpszFtp[]={'f','t','p',0};
- const WCHAR lpszGopher[]={'g','o','p','h','e','r',0};
- const WCHAR lpszHttp[]={'h','t','t','p',0};
- const WCHAR lpszHttps[]={'h','t','t','p','s',0};
- const WCHAR lpszFile[]={'f','i','l','e',0};
- const WCHAR lpszNews[]={'n','e','w','s',0};
- const WCHAR lpszMailto[]={'m','a','i','l','t','o',0};
- const WCHAR lpszRes[]={'r','e','s',0};
+ static const WCHAR lpszFtp[]={'f','t','p',0};
+ static const WCHAR lpszGopher[]={'g','o','p','h','e','r',0};
+ static const WCHAR lpszHttp[]={'h','t','t','p',0};
+ static const WCHAR lpszHttps[]={'h','t','t','p','s',0};
+ static const WCHAR lpszFile[]={'f','i','l','e',0};
+ static const WCHAR lpszNews[]={'n','e','w','s',0};
+ static const WCHAR lpszMailto[]={'m','a','i','l','t','o',0};
+ static const WCHAR lpszRes[]={'r','e','s',0};
WCHAR* tempBuffer=NULL;
TRACE("\n");
if(lpszScheme==NULL)
@@ -1197,7 +1197,7 @@
if (bIsAbsolute) /* Parse <protocol>:[//<net_loc>] */
{
LPWSTR lpszNetLoc;
- const WCHAR wszAbout[]={'a','b','o','u','t',':',0};
+ static const WCHAR wszAbout[]={'a','b','o','u','t',':',0};
/* Get scheme first. */
lpUC->nScheme = GetInternetSchemeW(lpszUrl, lpszcp - lpszUrl);
@@ -1680,7 +1680,7 @@
{
LPWININETHTTPREQW lpreq = (LPWININETHTTPREQW) lpwhh;
WCHAR url[1023];
- const WCHAR szFmt[] = {'h','t','t','p',':','/','/','%','s','%','s',0};
+ static const WCHAR szFmt[] = {'h','t','t','p',':','/','/','%','s','%','s',0};
sprintfW(url,szFmt,lpreq->lpszHostName,lpreq->lpszPath);
TRACE("INTERNET_OPTION_URL: %s\n",debugstr_w(url));
@@ -2076,7 +2076,7 @@
case INTERNET_SCHEME_HTTP:
case INTERNET_SCHEME_HTTPS: {
- const WCHAR szStars[] = { '*','/','*', 0 };
+ static const WCHAR szStars[] = { '*','/','*', 0 };
LPCWSTR accept[2] = { szStars, NULL };
if(urlComponents.nPort == 0) {
if(urlComponents.nScheme == INTERNET_SCHEME_HTTP)
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 2e683a7..3fc549c 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -518,14 +518,14 @@
{
HKEY hkey;
LONG r, len;
- const WCHAR szRunOnce[] = {
+ static const WCHAR szRunOnce[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'R','u','n','O','n','c','e',0
};
- const WCHAR szFormat[] = { '%','s',' ','"','%','s','"',0 };
+ static const WCHAR szFormat[] = { '%','s',' ','"','%','s','"',0 };
LPWSTR buffer;
WCHAR szExecutable[MAX_PATH];