Vincent Povirk : ole32: Remove the unused BlockBits structures from BigBlockFile objects.
Alexandre Julliard
julliard at winehq.org
Mon Mar 15 12:19:33 CDT 2010
Module: wine
Branch: master
Commit: b90ab46a82e673a6a930ea1271c77d78bedecc77
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b90ab46a82e673a6a930ea1271c77d78bedecc77
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Mar 10 16:36:54 2010 -0600
ole32: Remove the unused BlockBits structures from BigBlockFile objects.
---
dlls/ole32/stg_bigblockfile.c | 51 -----------------------------------------
1 files changed, 0 insertions(+), 51 deletions(-)
diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c
index 19151b9..4aa3026 100644
--- a/dlls/ole32/stg_bigblockfile.c
+++ b/dlls/ole32/stg_bigblockfile.c
@@ -63,19 +63,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage);
/* We map in PAGE_SIZE-sized chunks. Must be a multiple of 4096. */
#define PAGE_SIZE 131072
-#define BLOCKS_PER_PAGE (PAGE_SIZE / BIG_BLOCK_SIZE)
-
/* We keep a list of recently-discarded pages. This controls the
* size of that list. */
#define MAX_VICTIM_PAGES 16
-/* This structure provides one bit for each block in a page.
- * Use BIGBLOCKFILE_{Test,Set,Clear}Bit to manipulate it. */
-typedef struct
-{
- unsigned int bits[BLOCKS_PER_PAGE / (CHAR_BIT * sizeof(unsigned int))];
-} BlockBits;
-
/***
* This structure identifies the paged that are mapped
* from the file and their position in memory. It is
@@ -96,9 +87,6 @@ struct MappedPage
DWORD mapped_bytes;
LPVOID lpBytes;
LONG refcnt;
-
- BlockBits readable_blocks;
- BlockBits writable_blocks;
};
struct BigBlockFile
@@ -123,39 +111,6 @@ struct BigBlockFile
* pass expressions with side effects. */
#define ROUND_UP(a, b) ((((a) + (b) - 1)/(b))*(b))
-/***********************************************************
- * Blockbits functions.
- */
-static inline BOOL BIGBLOCKFILE_TestBit(const BlockBits *bb,
- unsigned int index)
-{
- unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int));
- unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int));
-
- return bb->bits[array_index] & (1 << bit_index);
-}
-
-static inline void BIGBLOCKFILE_SetBit(BlockBits *bb, unsigned int index)
-{
- unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int));
- unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int));
-
- bb->bits[array_index] |= (1 << bit_index);
-}
-
-static inline void BIGBLOCKFILE_ClearBit(BlockBits *bb, unsigned int index)
-{
- unsigned int array_index = index / (CHAR_BIT * sizeof(unsigned int));
- unsigned int bit_index = index % (CHAR_BIT * sizeof(unsigned int));
-
- bb->bits[array_index] &= ~(1 << bit_index);
-}
-
-static inline void BIGBLOCKFILE_Zero(BlockBits *bb)
-{
- memset(bb->bits, 0, sizeof(bb->bits));
-}
-
/******************************************************************************
* BIGBLOCKFILE_FileInit
*
@@ -302,9 +257,6 @@ static MappedPage *BIGBLOCKFILE_CreatePage(BigBlockFile *This, ULONG page_index)
return NULL;
}
- BIGBLOCKFILE_Zero(&page->readable_blocks);
- BIGBLOCKFILE_Zero(&page->writable_blocks);
-
return page;
}
@@ -328,9 +280,6 @@ static void * BIGBLOCKFILE_GetMappedView(
if (page)
{
This->num_victim_pages--;
-
- BIGBLOCKFILE_Zero(&page->readable_blocks);
- BIGBLOCKFILE_Zero(&page->writable_blocks);
}
}
More information about the wine-cvs
mailing list