mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 19:43:38 +00:00
shell32: Make some data static and const.
This commit is contained in:
parent
21bcfd72b0
commit
e4c0748c21
|
@ -109,7 +109,7 @@ static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *ifa
|
|||
* IShellFolder [ControlPanel] implementation
|
||||
*/
|
||||
|
||||
static shvheader ControlPanelSFHeader[] = {
|
||||
static const shvheader ControlPanelSFHeader[] = {
|
||||
{IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/
|
||||
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ static const columninfo RecycleBinColumns[] =
|
|||
|
||||
#define COLUMNS_COUNT 6
|
||||
|
||||
HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft)
|
||||
static HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft)
|
||||
{
|
||||
FILETIME lft;
|
||||
SYSTEMTIME time;
|
||||
|
@ -99,22 +99,22 @@ HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME ft)
|
|||
|
||||
typedef struct tagRecycleBin
|
||||
{
|
||||
IShellFolder2Vtbl *lpVtbl;
|
||||
IPersistFolder2Vtbl *lpPersistFolderVtbl;
|
||||
const IShellFolder2Vtbl *lpVtbl;
|
||||
const IPersistFolder2Vtbl *lpPersistFolderVtbl;
|
||||
LONG refCount;
|
||||
|
||||
LPITEMIDLIST pidl;
|
||||
} RecycleBin;
|
||||
|
||||
static IShellFolder2Vtbl recycleBinVtbl;
|
||||
static IPersistFolder2Vtbl recycleBinPersistVtbl;
|
||||
static const IShellFolder2Vtbl recycleBinVtbl;
|
||||
static const IPersistFolder2Vtbl recycleBinPersistVtbl;
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
void RecycleBin_Destructor(RecycleBin *This)
|
||||
static void RecycleBin_Destructor(RecycleBin *This)
|
||||
{
|
||||
/* InterlockedDecrement(&objCount);*/
|
||||
SHFree(This->pidl);
|
||||
|
@ -454,7 +454,7 @@ static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iCol
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static IShellFolder2Vtbl recycleBinVtbl =
|
||||
static const IShellFolder2Vtbl recycleBinVtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
RecycleBin_QueryInterface,
|
||||
|
@ -498,7 +498,7 @@ static ULONG WINAPI RecycleBin_IPersistFolder2_Release(IPersistFolder2 *This)
|
|||
return RecycleBin_Release((IShellFolder2 *)impl_from_IPersistFolder(This));
|
||||
}
|
||||
|
||||
static IPersistFolder2Vtbl recycleBinPersistVtbl =
|
||||
static const IPersistFolder2Vtbl recycleBinPersistVtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
RecycleBin_IPersistFolder2_QueryInterface,
|
||||
|
|
|
@ -60,9 +60,9 @@ typedef struct { /* structure for dropped files */
|
|||
/* memory block with filenames follows */
|
||||
} DROPFILESTRUCT16, *LPDROPFILESTRUCT16;
|
||||
|
||||
static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED";
|
||||
static const char* lpstrMsgWndDestroyed = "OTHERWINDOWDESTROYED";
|
||||
static const char* lpstrMsgShellActivate = "ACTIVATESHELLWINDOW";
|
||||
static const char lpstrMsgWndCreated[] = "OTHERWINDOWCREATED";
|
||||
static const char lpstrMsgWndDestroyed[] = "OTHERWINDOWDESTROYED";
|
||||
static const char lpstrMsgShellActivate[] = "ACTIVATESHELLWINDOW";
|
||||
|
||||
static HWND SHELL_hWnd = 0;
|
||||
static HHOOK SHELL_hHook = 0;
|
||||
|
|
|
@ -63,8 +63,6 @@ typedef struct {
|
|||
const IShellFolder2Vtbl *lpVtbl;
|
||||
LONG ref;
|
||||
|
||||
CLSID *pclsid;
|
||||
|
||||
/* both paths are parsible from the desktop */
|
||||
LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */
|
||||
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
||||
|
@ -76,7 +74,7 @@ typedef struct {
|
|||
#define _IUnknown_(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_COLUMN2, 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 =
|
|||
IUnknown_fnRelease,
|
||||
};
|
||||
|
||||
static shvheader GenericSFHeader[] = {
|
||||
static const shvheader GenericSFHeader[] = {
|
||||
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
||||
{IDS_SHV_COLUMN2, 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"};
|
|||
static const char strNoRun[] = {"NoRun"};
|
||||
|
||||
/* policy data array */
|
||||
POLICYDATA sh32_policy_table[] =
|
||||
static POLICYDATA sh32_policy_table[] =
|
||||
{
|
||||
{
|
||||
REST_NORUN,
|
||||
|
@ -796,7 +796,7 @@ POLICYDATA sh32_policy_table[] =
|
|||
0,
|
||||
0,
|
||||
SHELL_NO_POLICY
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -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 const char *unsafechars = "^&`{}|[]'<>\\#%\"+";
|
||||
static const char *hexchars = "0123456789ABCDEF";
|
||||
static const char unsafechars[] = "^&`{}|[]'<>\\#%\"+";
|
||||
static const char hexchars[] = "0123456789ABCDEF";
|
||||
int num_written = 0;
|
||||
const char *c;
|
||||
|
||||
|
@ -400,7 +400,7 @@ static int decode_url_code(const char *c)
|
|||
{
|
||||
const char *p1, *p2;
|
||||
int v1, v2;
|
||||
static const char *hexchars = "0123456789ABCDEF";
|
||||
static const char hexchars[] = "0123456789ABCDEF";
|
||||
if (*c == 0)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue