Commit e4c0748c authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

shell32: Make some data static and const.

parent 21bcfd72
...@@ -109,7 +109,7 @@ static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *ifa ...@@ -109,7 +109,7 @@ static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *ifa
* IShellFolder [ControlPanel] implementation * IShellFolder [ControlPanel] implementation
*/ */
static shvheader ControlPanelSFHeader[] = { static const shvheader ControlPanelSFHeader[] = {
{IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/
}; };
......
...@@ -73,7 +73,7 @@ static const columninfo RecycleBinColumns[] = ...@@ -73,7 +73,7 @@ static const columninfo RecycleBinColumns[] =
#define COLUMNS_COUNT 6 #define COLUMNS_COUNT 6
HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft) static HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft)
{ {
FILETIME lft; FILETIME lft;
SYSTEMTIME time; SYSTEMTIME time;
...@@ -99,22 +99,22 @@ HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft) ...@@ -99,22 +99,22 @@ HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft)
typedef struct tagRecycleBin typedef struct tagRecycleBin
{ {
IShellFolder2Vtbl *lpVtbl; const IShellFolder2Vtbl *lpVtbl;
IPersistFolder2Vtbl *lpPersistFolderVtbl; const IPersistFolder2Vtbl *lpPersistFolderVtbl;
LONG refCount; LONG refCount;
LPITEMIDLIST pidl; LPITEMIDLIST pidl;
} RecycleBin; } RecycleBin;
static IShellFolder2Vtbl recycleBinVtbl; static const IShellFolder2Vtbl recycleBinVtbl;
static IPersistFolder2Vtbl recycleBinPersistVtbl; static const IPersistFolder2Vtbl recycleBinPersistVtbl;
static RecycleBin *impl_from_IPersistFolder(IPersistFolder2 *iface) static RecycleBin *impl_from_IPersistFolder(IPersistFolder2 *iface)
{ {
return (RecycleBin *)((char*)iface - FIELD_OFFSET(RecycleBin, lpPersistFolderVtbl)); return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpPersistFolderVtbl));
} }
void RecycleBin_Destructor(RecycleBin *This); static void RecycleBin_Destructor(RecycleBin *This);
HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput)
{ {
...@@ -138,7 +138,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID * ...@@ -138,7 +138,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *
return S_OK; return S_OK;
} }
void RecycleBin_Destructor(RecycleBin *This) static void RecycleBin_Destructor(RecycleBin *This)
{ {
/* InterlockedDecrement(&objCount);*/ /* InterlockedDecrement(&objCount);*/
SHFree(This->pidl); SHFree(This->pidl);
...@@ -454,7 +454,7 @@ static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iCol ...@@ -454,7 +454,7 @@ static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iCol
return S_OK; return S_OK;
} }
static IShellFolder2Vtbl recycleBinVtbl = static const IShellFolder2Vtbl recycleBinVtbl =
{ {
/* IUnknown */ /* IUnknown */
RecycleBin_QueryInterface, RecycleBin_QueryInterface,
...@@ -498,7 +498,7 @@ static ULONG WINAPI RecycleBin_IPersistFolder2_Release(IPersistFolder2 *This) ...@@ -498,7 +498,7 @@ static ULONG WINAPI RecycleBin_IPersistFolder2_Release(IPersistFolder2 *This)
return RecycleBin_Release((IShellFolder2 *)impl_from_IPersistFolder(This)); return RecycleBin_Release((IShellFolder2 *)impl_from_IPersistFolder(This));
} }
static IPersistFolder2Vtbl recycleBinPersistVtbl = static const IPersistFolder2Vtbl recycleBinPersistVtbl =
{ {
/* IUnknown */ /* IUnknown */
RecycleBin_IPersistFolder2_QueryInterface, RecycleBin_IPersistFolder2_QueryInterface,
......
...@@ -60,9 +60,9 @@ typedef struct { /* structure for dropped files */ ...@@ -60,9 +60,9 @@ typedef struct { /* structure for dropped files */
/* memory block with filenames follows */ /* memory block with filenames follows */
} DROPFILESTRUCT16, *LPDROPFILESTRUCT16; } DROPFILESTRUCT16, *LPDROPFILESTRUCT16;
static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED"; static const char lpstrMsgWndCreated[] = "OTHERWINDOWCREATED";
static const char* lpstrMsgWndDestroyed = "OTHERWINDOWDESTROYED"; static const char lpstrMsgWndDestroyed[] = "OTHERWINDOWDESTROYED";
static const char* lpstrMsgShellActivate = "ACTIVATESHELLWINDOW"; static const char lpstrMsgShellActivate[] = "ACTIVATESHELLWINDOW";
static HWND SHELL_hWnd = 0; static HWND SHELL_hWnd = 0;
static HHOOK SHELL_hHook = 0; static HHOOK SHELL_hHook = 0;
......
...@@ -63,8 +63,6 @@ typedef struct { ...@@ -63,8 +63,6 @@ typedef struct {
const IShellFolder2Vtbl *lpVtbl; const IShellFolder2Vtbl *lpVtbl;
LONG ref; LONG ref;
CLSID *pclsid;
/* both paths are parsible from the desktop */ /* both paths are parsible from the desktop */
LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */
LPITEMIDLIST pidlRoot; /* absolute pidl */ LPITEMIDLIST pidlRoot; /* absolute pidl */
...@@ -76,7 +74,7 @@ typedef struct { ...@@ -76,7 +74,7 @@ typedef struct {
#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl)
#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
static shvheader DesktopSFHeader[] = { static const shvheader DesktopSFHeader[] = {
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
......
...@@ -208,7 +208,7 @@ static const IUnknownVtbl unkvt = ...@@ -208,7 +208,7 @@ static const IUnknownVtbl unkvt =
IUnknown_fnRelease, IUnknown_fnRelease,
}; };
static shvheader GenericSFHeader[] = { static const shvheader GenericSFHeader[] = {
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
......
...@@ -133,7 +133,7 @@ static const char strNoClose[] = {"NoClose"}; ...@@ -133,7 +133,7 @@ static const char strNoClose[] = {"NoClose"};
static const char strNoRun[] = {"NoRun"}; static const char strNoRun[] = {"NoRun"};
/* policy data array */ /* policy data array */
POLICYDATA sh32_policy_table[] = static POLICYDATA sh32_policy_table[] =
{ {
{ {
REST_NORUN, REST_NORUN,
...@@ -796,7 +796,7 @@ POLICYDATA sh32_policy_table[] = ...@@ -796,7 +796,7 @@ POLICYDATA sh32_policy_table[] =
0, 0,
0, 0,
SHELL_NO_POLICY SHELL_NO_POLICY
} }
}; };
/************************************************************************* /*************************************************************************
......
...@@ -364,8 +364,8 @@ static int dskentry_decode(const char *value, int len, char *output) ...@@ -364,8 +364,8 @@ static int dskentry_decode(const char *value, int len, char *output)
*/ */
static int url_encode(const char *value, char *output) static int url_encode(const char *value, char *output)
{ {
static const char *unsafechars = "^&`{}|[]'<>\\#%\"+"; static const char unsafechars[] = "^&`{}|[]'<>\\#%\"+";
static const char *hexchars = "0123456789ABCDEF"; static const char hexchars[] = "0123456789ABCDEF";
int num_written = 0; int num_written = 0;
const char *c; const char *c;
...@@ -400,7 +400,7 @@ static int decode_url_code(const char *c) ...@@ -400,7 +400,7 @@ static int decode_url_code(const char *c)
{ {
const char *p1, *p2; const char *p1, *p2;
int v1, v2; int v1, v2;
static const char *hexchars = "0123456789ABCDEF"; static const char hexchars[] = "0123456789ABCDEF";
if (*c == 0) if (*c == 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment