Commit 8a8471a7 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Rename PROPSET_BLOCK_SIZE to RAW_DIRENTRY_SIZE.

parent 74d05030
...@@ -1099,7 +1099,7 @@ static HRESULT createDirEntry( ...@@ -1099,7 +1099,7 @@ static HRESULT createDirEntry(
ULONG currentPropertyIndex = 0; ULONG currentPropertyIndex = 0;
ULONG newPropertyIndex = DIRENTRY_NULL; ULONG newPropertyIndex = DIRENTRY_NULL;
HRESULT hr = S_OK; HRESULT hr = S_OK;
BYTE currentData[PROPSET_BLOCK_SIZE]; BYTE currentData[RAW_DIRENTRY_SIZE];
WORD sizeOfNameString; WORD sizeOfNameString;
do do
...@@ -1139,7 +1139,7 @@ static HRESULT createDirEntry( ...@@ -1139,7 +1139,7 @@ static HRESULT createDirEntry(
*/ */
if (FAILED(hr)) if (FAILED(hr))
{ {
BYTE emptyData[PROPSET_BLOCK_SIZE]; BYTE emptyData[RAW_DIRENTRY_SIZE];
ULARGE_INTEGER newSize; ULARGE_INTEGER newSize;
ULONG propertyIndex; ULONG propertyIndex;
ULONG lastProperty = 0; ULONG lastProperty = 0;
...@@ -1166,12 +1166,12 @@ static HRESULT createDirEntry( ...@@ -1166,12 +1166,12 @@ static HRESULT createDirEntry(
* memset the empty property in order to initialize the unused newly * memset the empty property in order to initialize the unused newly
* created property * created property
*/ */
memset(&emptyData, 0, PROPSET_BLOCK_SIZE); memset(&emptyData, 0, RAW_DIRENTRY_SIZE);
/* /*
* initialize them * initialize them
*/ */
lastProperty = storage->bigBlockSize / PROPSET_BLOCK_SIZE * blockCount; lastProperty = storage->bigBlockSize / RAW_DIRENTRY_SIZE * blockCount;
for( for(
propertyIndex = newPropertyIndex + 1; propertyIndex = newPropertyIndex + 1;
...@@ -1206,9 +1206,9 @@ static HRESULT destroyDirEntry( ...@@ -1206,9 +1206,9 @@ static HRESULT destroyDirEntry(
ULONG index) ULONG index)
{ {
HRESULT hr; HRESULT hr;
BYTE emptyData[PROPSET_BLOCK_SIZE]; BYTE emptyData[RAW_DIRENTRY_SIZE];
memset(&emptyData, 0, PROPSET_BLOCK_SIZE); memset(&emptyData, 0, RAW_DIRENTRY_SIZE);
hr = StorageImpl_WriteRawDirEntry(storage, index, emptyData); hr = StorageImpl_WriteRawDirEntry(storage, index, emptyData);
...@@ -3000,12 +3000,12 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer ...@@ -3000,12 +3000,12 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer
ULONG bytesRead; ULONG bytesRead;
offset.u.HighPart = 0; offset.u.HighPart = 0;
offset.u.LowPart = index * PROPSET_BLOCK_SIZE; offset.u.LowPart = index * RAW_DIRENTRY_SIZE;
hr = BlockChainStream_ReadAt( hr = BlockChainStream_ReadAt(
This->rootBlockChain, This->rootBlockChain,
offset, offset,
PROPSET_BLOCK_SIZE, RAW_DIRENTRY_SIZE,
buffer, buffer,
&bytesRead); &bytesRead);
...@@ -3026,12 +3026,12 @@ HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE ...@@ -3026,12 +3026,12 @@ HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE
ULONG bytesRead; ULONG bytesRead;
offset.u.HighPart = 0; offset.u.HighPart = 0;
offset.u.LowPart = index * PROPSET_BLOCK_SIZE; offset.u.LowPart = index * RAW_DIRENTRY_SIZE;
hr = BlockChainStream_WriteAt( hr = BlockChainStream_WriteAt(
This->rootBlockChain, This->rootBlockChain,
offset, offset,
PROPSET_BLOCK_SIZE, RAW_DIRENTRY_SIZE,
buffer, buffer,
&bytesRead); &bytesRead);
...@@ -3047,7 +3047,7 @@ HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE ...@@ -3047,7 +3047,7 @@ HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE
*/ */
void UpdateRawDirEntry(BYTE *buffer, const DirEntry *newData) void UpdateRawDirEntry(BYTE *buffer, const DirEntry *newData)
{ {
memset(buffer, 0, PROPSET_BLOCK_SIZE); memset(buffer, 0, RAW_DIRENTRY_SIZE);
memcpy( memcpy(
buffer + OFFSET_PS_NAME, buffer + OFFSET_PS_NAME,
...@@ -3122,7 +3122,7 @@ BOOL StorageImpl_ReadDirEntry( ...@@ -3122,7 +3122,7 @@ BOOL StorageImpl_ReadDirEntry(
ULONG index, ULONG index,
DirEntry* buffer) DirEntry* buffer)
{ {
BYTE currentProperty[PROPSET_BLOCK_SIZE]; BYTE currentProperty[RAW_DIRENTRY_SIZE];
HRESULT readRes; HRESULT readRes;
readRes = StorageImpl_ReadRawDirEntry(This, index, currentProperty); readRes = StorageImpl_ReadRawDirEntry(This, index, currentProperty);
...@@ -3211,7 +3211,7 @@ BOOL StorageImpl_WriteDirEntry( ...@@ -3211,7 +3211,7 @@ BOOL StorageImpl_WriteDirEntry(
ULONG index, ULONG index,
const DirEntry* buffer) const DirEntry* buffer)
{ {
BYTE currentProperty[PROPSET_BLOCK_SIZE]; BYTE currentProperty[RAW_DIRENTRY_SIZE];
HRESULT writeRes; HRESULT writeRes;
UpdateRawDirEntry(currentProperty, buffer); UpdateRawDirEntry(currentProperty, buffer);
......
...@@ -77,7 +77,7 @@ static const ULONG DIRENTRY_NULL = 0xFFFFFFFF; ...@@ -77,7 +77,7 @@ static const ULONG DIRENTRY_NULL = 0xFFFFFFFF;
#define DIRENTRY_NAME_MAX_LEN 0x20 #define DIRENTRY_NAME_MAX_LEN 0x20
#define DIRENTRY_NAME_BUFFER_LEN 0x40 #define DIRENTRY_NAME_BUFFER_LEN 0x40
#define PROPSET_BLOCK_SIZE 0x00000080 #define RAW_DIRENTRY_SIZE 0x00000080
/* /*
* Property type of relation * Property type of relation
......
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