Make Unicode strings 'static const' (part 1)
Francois Gouget
fgouget at free.fr
Mon Apr 19 07:43:21 CDT 2004
For this first patch I just marked the const Unicode strings that are
declared in functions as static so that they are not copied to the stack
each time we enter the function.
However, while I was at it I also marked some global Unicode const
strings as static when they are not used outside the file they are
declared in.
Changelog:
* dlls/advapi32/service.c
dlls/commdlg/printdlg.c
dlls/crypt32/main.c
dlls/devenum/devenum_main.c
dlls/devenum/mediacatenum.c
dlls/gdi/freetype.c
dlls/kernel/comm.c
dlls/kernel/format_msg.c
dlls/kernel/locale.c
dlls/mshtml/main.c
dlls/msi/create.c
dlls/msi/insert.c
dlls/msi/msi.c
dlls/msi/record.c
dlls/msi/suminfo.c
dlls/msi/table.c
dlls/netapi32/access.c
dlls/netapi32/tests/access.c
dlls/oleaut32/typelib.c
dlls/quartz/filesource.c
dlls/richedit/richedit.c
dlls/shdocvw/shdocvw_main.c
dlls/shell32/brsfolder.c
dlls/shell32/classes.c
dlls/shell32/shelllink.c
dlls/urlmon/umon.c
dlls/uxtheme/system.c
dlls/wininet/cookie.c
dlls/wininet/dialogs.c
dlls/wininet/http.c
dlls/wininet/internet.c
programs/winemenubuilder/winemenubuilder.c
Make Unicode const strings static so they are not copied to the stack
each time we enter the function.
Index: dlls/advapi32/service.c
===================================================================
RCS file: /var/cvs/wine/dlls/advapi32/service.c,v
retrieving revision 1.43
diff -u -r1.43 service.c
--- a/dlls/advapi32/service.c 12 Apr 2004 22:18:39 -0000 1.43
+++ b/dlls/advapi32/service.c 18 Apr 2004 14:07:42 -0000
@@ -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;
Index: dlls/commdlg/printdlg.c
===================================================================
RCS file: /var/cvs/wine/dlls/commdlg/printdlg.c,v
retrieving revision 1.74
diff -u -r1.74 printdlg.c
--- a/dlls/commdlg/printdlg.c 9 Jan 2004 05:10:35 -0000 1.74
+++ b/dlls/commdlg/printdlg.c 18 Apr 2004 16:36:46 -0000
@@ -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. */
Index: dlls/crypt32/main.c
===================================================================
RCS file: /var/cvs/wine/dlls/crypt32/main.c,v
retrieving revision 1.17
diff -u -r1.17 main.c
--- a/dlls/crypt32/main.c 1 Mar 2004 21:19:37 -0000 1.17
+++ b/dlls/crypt32/main.c 18 Apr 2004 15:03:18 -0000
@@ -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;
Index: dlls/devenum/devenum_main.c
===================================================================
RCS file: /var/cvs/wine/dlls/devenum/devenum_main.c,v
retrieving revision 1.5
diff -u -r1.5 devenum_main.c
--- a/dlls/devenum/devenum_main.c 30 Dec 2003 21:52:45 -0000 1.5
+++ b/dlls/devenum/devenum_main.c 18 Apr 2004 14:09:51 -0000
@@ -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;
Index: dlls/devenum/mediacatenum.c
===================================================================
RCS file: /var/cvs/wine/dlls/devenum/mediacatenum.c,v
retrieving revision 1.4
diff -u -r1.4 mediacatenum.c
--- a/dlls/devenum/mediacatenum.c 30 Dec 2003 21:52:45 -0000 1.4
+++ b/dlls/devenum/mediacatenum.c 18 Apr 2004 14:11:12 -0000
@@ -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);
Index: dlls/gdi/freetype.c
===================================================================
RCS file: /var/cvs/wine/dlls/gdi/freetype.c,v
retrieving revision 1.58
diff -u -r1.58 freetype.c
--- a/dlls/gdi/freetype.c 14 Apr 2004 19:40:54 -0000 1.58
+++ b/dlls/gdi/freetype.c 18 Apr 2004 13:38:54 -0000
@@ -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,
Index: dlls/kernel/comm.c
===================================================================
RCS file: /var/cvs/wine/dlls/kernel/comm.c,v
retrieving revision 1.79
diff -u -r1.79 comm.c
--- a/dlls/kernel/comm.c 14 Apr 2004 19:33:27 -0000 1.79
+++ b/dlls/kernel/comm.c 18 Apr 2004 16:08:21 -0000
@@ -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));
Index: dlls/kernel/format_msg.c
===================================================================
RCS file: /var/cvs/wine/dlls/kernel/format_msg.c,v
retrieving revision 1.34
diff -u -r1.34 format_msg.c
--- a/dlls/kernel/format_msg.c 19 Mar 2004 19:15:54 -0000 1.34
+++ b/dlls/kernel/format_msg.c 18 Apr 2004 15:51:22 -0000
@@ -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)
Index: dlls/kernel/locale.c
===================================================================
RCS file: /var/cvs/wine/dlls/kernel/locale.c,v
retrieving revision 1.40
diff -u -r1.40 locale.c
--- a/dlls/kernel/locale.c 5 Apr 2004 20:14:34 -0000 1.40
+++ b/dlls/kernel/locale.c 18 Apr 2004 15:51:44 -0000
@@ -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;
Index: dlls/mshtml/main.c
===================================================================
RCS file: /var/cvs/wine/dlls/mshtml/main.c,v
retrieving revision 1.3
diff -u -r1.3 main.c
--- a/dlls/mshtml/main.c 16 Jan 2004 23:27:11 -0000 1.3
+++ b/dlls/mshtml/main.c 18 Apr 2004 16:01:02 -0000
@@ -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];
Index: dlls/msi/create.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/create.c,v
retrieving revision 1.3
diff -u -r1.3 create.c
--- a/dlls/msi/create.c 19 Mar 2004 19:14:12 -0000 1.3
+++ b/dlls/msi/create.c 18 Apr 2004 15:59:42 -0000
@@ -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),
Index: dlls/msi/insert.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/insert.c,v
retrieving revision 1.1
diff -u -r1.1 insert.c
--- a/dlls/msi/insert.c 20 Mar 2004 19:18:46 -0000 1.1
+++ b/dlls/msi/insert.c 18 Apr 2004 16:00:40 -0000
@@ -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),
Index: dlls/msi/msi.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/msi.c,v
retrieving revision 1.17
diff -u -r1.17 msi.c
--- a/dlls/msi/msi.c 12 Apr 2004 22:06:12 -0000 1.17
+++ b/dlls/msi/msi.c 18 Apr 2004 15:57:22 -0000
@@ -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,
Index: dlls/msi/record.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/record.c,v
retrieving revision 1.4
diff -u -r1.4 record.c
--- a/dlls/msi/record.c 19 Mar 2004 19:14:12 -0000 1.4
+++ b/dlls/msi/record.c 18 Apr 2004 15:57:40 -0000
@@ -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);
Index: dlls/msi/suminfo.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/suminfo.c,v
retrieving revision 1.6
diff -u -r1.6 suminfo.c
--- a/dlls/msi/suminfo.c 19 Mar 2004 19:14:12 -0000 1.6
+++ b/dlls/msi/suminfo.c 18 Apr 2004 15:57:52 -0000
@@ -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 )
Index: dlls/msi/table.c
===================================================================
RCS file: /var/cvs/wine/dlls/msi/table.c,v
retrieving revision 1.10
diff -u -r1.10 table.c
--- a/dlls/msi/table.c 19 Mar 2004 19:14:12 -0000 1.10
+++ b/dlls/msi/table.c 18 Apr 2004 15:59:28 -0000
@@ -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;
Index: dlls/netapi32/access.c
===================================================================
RCS file: /var/cvs/wine/dlls/netapi32/access.c,v
retrieving revision 1.7
diff -u -r1.7 access.c
--- a/dlls/netapi32/access.c 6 Feb 2004 05:17:39 -0000 1.7
+++ b/dlls/netapi32/access.c 18 Apr 2004 15:56:12 -0000
@@ -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 */
Index: dlls/netapi32/tests/access.c
===================================================================
RCS file: /var/cvs/wine/dlls/netapi32/tests/access.c,v
retrieving revision 1.6
diff -u -r1.6 access.c
--- a/dlls/netapi32/tests/access.c 5 Apr 2004 20:17:45 -0000 1.6
+++ b/dlls/netapi32/tests/access.c 18 Apr 2004 15:55:21 -0000
@@ -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;
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /var/cvs/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.111
diff -u -r1.111 typelib.c
--- a/dlls/oleaut32/typelib.c 22 Mar 2004 22:57:51 -0000 1.111
+++ b/dlls/oleaut32/typelib.c 18 Apr 2004 14:12:29 -0000
@@ -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);
}
Index: dlls/quartz/filesource.c
===================================================================
RCS file: /var/cvs/wine/dlls/quartz/filesource.c,v
retrieving revision 1.3
diff -u -r1.3 filesource.c
--- a/dlls/quartz/filesource.c 25 Sep 2003 23:50:06 -0000 1.3
+++ b/dlls/quartz/filesource.c 18 Apr 2004 15:55:02 -0000
@@ -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)
Index: dlls/richedit/richedit.c
===================================================================
RCS file: /var/cvs/wine/dlls/richedit/richedit.c,v
retrieving revision 1.33
diff -u -r1.33 richedit.c
--- a/dlls/richedit/richedit.c 30 Jan 2004 22:56:33 -0000 1.33
+++ b/dlls/richedit/richedit.c 18 Apr 2004 15:51:06 -0000
@@ -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
{
Index: dlls/shdocvw/shdocvw_main.c
===================================================================
RCS file: /var/cvs/wine/dlls/shdocvw/shdocvw_main.c,v
retrieving revision 1.18
diff -u -r1.18 shdocvw_main.c
--- a/dlls/shdocvw/shdocvw_main.c 21 Feb 2004 04:01:22 -0000 1.18
+++ b/dlls/shdocvw/shdocvw_main.c 18 Apr 2004 15:54:24 -0000
@@ -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];
Index: dlls/shell32/brsfolder.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/brsfolder.c,v
retrieving revision 1.49
diff -u -r1.49 brsfolder.c
--- a/dlls/shell32/brsfolder.c 7 Jan 2004 00:47:35 -0000 1.49
+++ b/dlls/shell32/brsfolder.c 18 Apr 2004 13:04:15 -0000
@@ -438,7 +438,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.@]
Index: dlls/shell32/classes.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/classes.c,v
retrieving revision 1.33
diff -u -r1.33 classes.c
--- a/dlls/shell32/classes.c 16 Jan 2004 23:06:25 -0000 1.33
+++ b/dlls/shell32/classes.c 18 Apr 2004 13:04:34 -0000
@@ -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)
{
Index: dlls/shell32/shelllink.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/shelllink.c,v
retrieving revision 1.67
diff -u -r1.67 shelllink.c
--- a/dlls/shell32/shelllink.c 12 Apr 2004 23:12:39 -0000 1.67
+++ b/dlls/shell32/shelllink.c 18 Apr 2004 14:12:58 -0000
@@ -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;
Index: dlls/urlmon/umon.c
===================================================================
RCS file: /var/cvs/wine/dlls/urlmon/umon.c,v
retrieving revision 1.29
diff -u -r1.29 umon.c
--- a/dlls/urlmon/umon.c 31 Mar 2004 19:58:09 -0000 1.29
+++ b/dlls/urlmon/umon.c 18 Apr 2004 15:11:29 -0000
@@ -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;
Index: dlls/uxtheme/system.c
===================================================================
RCS file: /var/cvs/wine/dlls/uxtheme/system.c,v
retrieving revision 1.10
diff -u -r1.10 system.c
--- a/dlls/uxtheme/system.c 7 Apr 2004 18:59:23 -0000 1.10
+++ b/dlls/uxtheme/system.c 18 Apr 2004 16:01:30 -0000
@@ -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'
};
Index: dlls/wininet/cookie.c
===================================================================
RCS file: /var/cvs/wine/dlls/wininet/cookie.c,v
retrieving revision 1.6
diff -u -r1.6 cookie.c
--- a/dlls/wininet/cookie.c 12 Apr 2004 23:13:53 -0000 1.6
+++ b/dlls/wininet/cookie.c 18 Apr 2004 15:49:44 -0000
@@ -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,
Index: dlls/wininet/dialogs.c
===================================================================
RCS file: /var/cvs/wine/dlls/wininet/dialogs.c,v
retrieving revision 1.5
diff -u -r1.5 dialogs.c
--- a/dlls/wininet/dialogs.c 12 Apr 2004 23:13:53 -0000 1.5
+++ b/dlls/wininet/dialogs.c 18 Apr 2004 15:50:42 -0000
@@ -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 );
Index: dlls/wininet/http.c
===================================================================
RCS file: /var/cvs/wine/dlls/wininet/http.c,v
retrieving revision 1.58
diff -u -r1.58 http.c
--- a/dlls/wininet/http.c 13 Apr 2004 00:19:58 -0000 1.58
+++ b/dlls/wininet/http.c 18 Apr 2004 17:06:01 -0000
@@ -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 +607,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 +670,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 +698,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 +716,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 +789,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 +1419,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 +1540,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 +1554,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 +1565,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 +1658,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 +1678,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 +1952,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 +2087,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};
Index: dlls/wininet/internet.c
===================================================================
RCS file: /var/cvs/wine/dlls/wininet/internet.c,v
retrieving revision 1.81
diff -u -r1.81 internet.c
--- a/dlls/wininet/internet.c 12 Apr 2004 23:13:53 -0000 1.81
+++ b/dlls/wininet/internet.c 18 Apr 2004 16:08:03 -0000
@@ -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)
Index: programs/winemenubuilder/winemenubuilder.c
===================================================================
RCS file: /var/cvs/wine/programs/winemenubuilder/winemenubuilder.c,v
retrieving revision 1.11
diff -u -r1.11 winemenubuilder.c
--- a/programs/winemenubuilder/winemenubuilder.c 14 Apr 2004 19:40:53 -0000 1.11
+++ b/programs/winemenubuilder/winemenubuilder.c 18 Apr 2004 16:02:26 -0000
@@ -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];
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Linux, WinNT, MS-DOS - also known as the Good, the Bad and the Ugly.
More information about the wine-patches
mailing list