Commit 518ee99f authored by Alexandre Julliard's avatar Alexandre Julliard

ole32: Make some functions and variables static.

parent 0b8c8035
......@@ -82,7 +82,7 @@ HINSTANCE OLE32_hInstance = 0; /* FIXME: make static ... */
static HRESULT COM_GetRegisteredClassObject(REFCLSID rclsid, DWORD dwClsContext, LPUNKNOWN* ppUnk);
static void COM_RevokeAllClasses(void);
APARTMENT *MTA; /* protected by csApartment */
static APARTMENT *MTA; /* protected by csApartment */
static struct list apts = LIST_INIT( apts ); /* protected by csApartment */
static CRITICAL_SECTION csApartment;
......
......@@ -171,7 +171,6 @@ struct oletls
/* Global Interface Table Functions */
extern void* StdGlobalInterfaceTable_Construct(void);
extern void StdGlobalInterfaceTable_Destroy(void* self);
extern HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv);
extern void* StdGlobalInterfaceTableInstance;
......
......@@ -94,7 +94,8 @@ static CRITICAL_SECTION git_section = { &critsect_debug, -1, 0, 0, 0, 0 };
/** This destroys it again. It should revoke all the held interfaces first **/
void StdGlobalInterfaceTable_Destroy(void* self) {
static void StdGlobalInterfaceTable_Destroy(void* self)
{
TRACE("(%p)\n", self);
FIXME("Revoke held interfaces here\n");
......
......@@ -129,13 +129,13 @@ static void OLEUTL_ReadRegistryDWORDValue(HKEY regKey, DWORD* pdwValue);
*/
static void OLEMenu_Initialize(void);
static void OLEMenu_UnInitialize(void);
BOOL OLEMenu_InstallHooks( DWORD tid );
BOOL OLEMenu_UnInstallHooks( DWORD tid );
OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid );
static BOOL OLEMenu_InstallHooks( DWORD tid );
static BOOL OLEMenu_UnInstallHooks( DWORD tid );
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid );
static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *pnPos );
BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor );
LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam);
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor );
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam);
/******************************************************************************
* These are the prototypes of the OLE Clipboard initialization methods (in clipboard.c)
......@@ -1103,7 +1103,7 @@ HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCl
*
* Initializes the OLEMENU data structures.
*/
static void OLEMenu_Initialize()
static void OLEMenu_Initialize(void)
{
}
......@@ -1112,7 +1112,7 @@ static void OLEMenu_Initialize()
*
* Releases the OLEMENU data structures.
*/
static void OLEMenu_UnInitialize()
static void OLEMenu_UnInitialize(void)
{
}
......@@ -1123,7 +1123,7 @@ static void OLEMenu_UnInitialize()
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
BOOL OLEMenu_InstallHooks( DWORD tid )
static BOOL OLEMenu_InstallHooks( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
......@@ -1172,7 +1172,7 @@ CLEANUP:
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
BOOL OLEMenu_UnInstallHooks( DWORD tid )
static BOOL OLEMenu_UnInstallHooks( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
OleMenuHookItem **ppHook = &hook_list;
......@@ -1214,7 +1214,7 @@ CLEANUP:
* RETURNS: The pointer and index of the hook table entry for the tid
* NULL and -1 for the index if no hooks were installed for this thread
*/
OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid )
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
......@@ -1280,7 +1280,7 @@ static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *
* RETURNS: TRUE if the popup menu is part of a server owned group
* FALSE if the popup menu is part of a container owned group
*/
BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor )
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor )
{
UINT nPos = 0, nWidth, i;
......@@ -1319,7 +1319,7 @@ BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor
* Thread scope WH_CALLWNDPROC hook proc filter function (callback)
* This is invoked from a message hook installed in OleSetMenuDescriptor.
*/
LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPCWPSTRUCT pMsg = NULL;
HOLEMENU hOleMenu = 0;
......@@ -1424,7 +1424,7 @@ NEXTHOOK:
* Thread scope WH_GETMESSAGE hook proc filter function (callback)
* This is invoked from a message hook installed in OleSetMenuDescriptor.
*/
LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPMSG pMsg = NULL;
HOLEMENU hOleMenu = 0;
......
......@@ -123,7 +123,6 @@ static const BYTE STORAGE_oldmagic[8] ={0xd0,0xcf,0x11,0xe0,0x0e,0x11,0xfc,0x0d}
*/
typedef struct StorageBaseImpl StorageBaseImpl;
typedef struct StorageImpl StorageImpl;
typedef struct StorageInternalImpl StorageInternalImpl;
typedef struct BlockChainStream BlockChainStream;
typedef struct SmallBlockChainStream SmallBlockChainStream;
typedef struct IEnumSTATSTGImpl IEnumSTATSTGImpl;
......@@ -257,9 +256,7 @@ struct StorageBaseImpl
* StorageBaseImpl stream list handlers
*/
void StorageBaseImpl_AddStream(StorageBaseImpl * stg, StgStreamImpl * strm);
void StorageBaseImpl_RemoveStream(StorageBaseImpl * stg, StgStreamImpl * strm);
void StorageBaseImpl_DeleteAll(StorageBaseImpl * stg);
/****************************************************************************
* Storage32Impl definitions.
......@@ -312,63 +309,6 @@ struct StorageImpl
BigBlockFile* bigBlockFile;
};
void StorageImpl_Destroy(
StorageBaseImpl* This);
HRESULT StorageImpl_Construct(
StorageImpl* This,
HANDLE hFile,
LPCOLESTR pwcsName,
ILockBytes* pLkbyt,
DWORD openFlags,
BOOL fileBased,
BOOL fileCreate);
BOOL StorageImpl_ReadBigBlock(
StorageImpl* This,
ULONG blockIndex,
void* buffer);
BOOL StorageImpl_WriteBigBlock(
StorageImpl* This,
ULONG blockIndex,
void* buffer);
void* StorageImpl_GetROBigBlock(
StorageImpl* This,
ULONG blockIndex);
void* StorageImpl_GetBigBlock(
StorageImpl* This,
ULONG blockIndex);
void StorageImpl_ReleaseBigBlock(
StorageImpl* This,
void* pBigBlock);
ULONG StorageImpl_GetNextFreeBigBlock(
StorageImpl* This);
void StorageImpl_FreeBigBlock(
StorageImpl* This,
ULONG blockIndex);
HRESULT StorageImpl_GetNextBlockInChain(
StorageImpl* This,
ULONG blockIndex,
ULONG* nextBlockIndex);
void StorageImpl_SetNextBlockInChain(
StorageImpl* This,
ULONG blockIndex,
ULONG nextBlock);
HRESULT StorageImpl_LoadFileHeader(
StorageImpl* This);
void StorageImpl_SaveFileHeader(
StorageImpl* This);
BOOL StorageImpl_ReadProperty(
StorageImpl* This,
ULONG index,
......@@ -383,103 +323,6 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
StorageImpl* This,
SmallBlockChainStream** ppsbChain);
ULONG Storage32Impl_GetNextExtendedBlock(StorageImpl* This,
ULONG blockIndex);
void Storage32Impl_AddBlockDepot(StorageImpl* This,
ULONG blockIndex);
ULONG Storage32Impl_AddExtBlockDepot(StorageImpl* This);
ULONG Storage32Impl_GetExtDepotBlock(StorageImpl* This,
ULONG depotIndex);
void Storage32Impl_SetExtDepotBlock(StorageImpl* This,
ULONG depotIndex,
ULONG blockIndex);
/****************************************************************************
* Storage32InternalImpl definitions.
*
* Definition of the implementation structure for the IStorage32 interface.
* This one implements the IStorage32 interface for storage that are
* inside another storage.
*/
struct StorageInternalImpl
{
struct StorageBaseImpl base;
/*
* There is no specific data for this class.
*/
};
/*
* Method definitions for the Storage32InternalImpl class.
*/
StorageInternalImpl* StorageInternalImpl_Construct(
StorageImpl* ancestorStorage,
DWORD openFlags,
ULONG rootTropertyIndex);
void StorageInternalImpl_Destroy(
StorageBaseImpl* This);
/****************************************************************************
* IEnumSTATSTGImpl definitions.
*
* Definition of the implementation structure for the IEnumSTATSTGImpl interface.
* This class allows iterating through the content of a storage and to find
* specific items inside it.
*/
struct IEnumSTATSTGImpl
{
const IEnumSTATSTGVtbl *lpVtbl; /* Needs to be the first item in the struct
* since we want to cast this in an IEnumSTATSTG pointer */
LONG ref; /* Reference count */
StorageImpl* parentStorage; /* Reference to the parent storage */
ULONG firstPropertyNode; /* Index of the root of the storage to enumerate */
/*
* The current implementation of the IEnumSTATSTGImpl class uses a stack
* to walk the property sets to get the content of a storage. This stack
* is implemented by the following 3 data members
*/
ULONG stackSize;
ULONG stackMaxSize;
ULONG* stackToVisit;
#define ENUMSTATSGT_SIZE_INCREMENT 10
};
IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
StorageImpl* This,
ULONG firstPropertyNode);
void IEnumSTATSTGImpl_Destroy(
IEnumSTATSTGImpl* This);
void IEnumSTATSTGImpl_PushSearchNode(
IEnumSTATSTGImpl* This,
ULONG nodeToPush);
ULONG IEnumSTATSTGImpl_PopSearchNode(
IEnumSTATSTGImpl* This,
BOOL remove);
ULONG IEnumSTATSTGImpl_FindProperty(
IEnumSTATSTGImpl* This,
const OLECHAR* lpszPropName,
StgProperty* buffer);
INT IEnumSTATSTGImpl_FindParentProperty(
IEnumSTATSTGImpl *This,
ULONG childProperty,
StgProperty *currentProperty,
ULONG *propertyId);
/****************************************************************************
* StgStreamImpl definitions.
*
......@@ -611,9 +454,6 @@ BlockChainStream* BlockChainStream_Construct(
void BlockChainStream_Destroy(
BlockChainStream* This);
ULONG BlockChainStream_GetHeadOfChain(
BlockChainStream* This);
BOOL BlockChainStream_ReadAt(
BlockChainStream* This,
ULARGE_INTEGER offset,
......@@ -632,12 +472,6 @@ BOOL BlockChainStream_SetSize(
BlockChainStream* This,
ULARGE_INTEGER newSize);
ULARGE_INTEGER BlockChainStream_GetSize(
BlockChainStream* This);
ULONG BlockChainStream_GetCount(
BlockChainStream* This);
/****************************************************************************
* SmallBlockChainStream definitions.
*
......@@ -660,26 +494,6 @@ SmallBlockChainStream* SmallBlockChainStream_Construct(
void SmallBlockChainStream_Destroy(
SmallBlockChainStream* This);
ULONG SmallBlockChainStream_GetHeadOfChain(
SmallBlockChainStream* This);
HRESULT SmallBlockChainStream_GetNextBlockInChain(
SmallBlockChainStream* This,
ULONG blockIndex,
ULONG* nextBlockIndex);
void SmallBlockChainStream_SetNextBlockInChain(
SmallBlockChainStream* This,
ULONG blockIndex,
ULONG nextBlock);
void SmallBlockChainStream_FreeBlock(
SmallBlockChainStream* This,
ULONG blockIndex);
ULONG SmallBlockChainStream_GetNextFreeBlock(
SmallBlockChainStream* This);
HRESULT SmallBlockChainStream_ReadAt(
SmallBlockChainStream* This,
ULARGE_INTEGER offset,
......@@ -698,11 +512,5 @@ BOOL SmallBlockChainStream_SetSize(
SmallBlockChainStream* This,
ULARGE_INTEGER newSize);
ULARGE_INTEGER SmallBlockChainStream_GetSize(
SmallBlockChainStream* This);
ULONG SmallBlockChainStream_GetCount(
SmallBlockChainStream* This);
#endif /* __STORAGE32_H__ */
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