Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
37abf45e
Commit
37abf45e
authored
Nov 20, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use BOOL type where appropriate.
parent
fbcbd09b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
storage32.c
dlls/ole32/storage32.c
+28
-28
storage32.h
dlls/ole32/storage32.h
+2
-2
No files found.
dlls/ole32/storage32.c
View file @
37abf45e
...
...
@@ -138,20 +138,20 @@ typedef struct TransactedDirEntry
DirRef
transactedParentEntry
;
/* True if this entry is being used. */
int
inuse
;
BOOL
inuse
;
/* True if data is up to date. */
int
read
;
BOOL
read
;
/* True if this entry has been modified. */
int
dirty
;
BOOL
dirty
;
/* True if this entry's stream has been modified. */
int
stream_dirty
;
BOOL
stream_dirty
;
/* True if this entry has been deleted in the transacted storage, but the
* delete has not yet been committed. */
int
deleted
;
BOOL
deleted
;
/* If this entry's stream has been modified, a reference to where the stream
* is stored in the snapshot file. */
...
...
@@ -4383,7 +4383,7 @@ static DirRef TransactedSnapshotImpl_FindFreeEntry(TransactedSnapshotImpl *This)
This
->
entries_size
=
new_size
;
}
This
->
entries
[
result
].
inuse
=
1
;
This
->
entries
[
result
].
inuse
=
TRUE
;
This
->
firstFreeEntry
=
result
+
1
;
...
...
@@ -4404,7 +4404,7 @@ static DirRef TransactedSnapshotImpl_CreateStubEntry(
entry
->
newTransactedParentEntry
=
entry
->
transactedParentEntry
=
parentEntryRef
;
entry
->
read
=
0
;
entry
->
read
=
FALSE
;
}
return
stubEntryRef
;
...
...
@@ -4449,7 +4449,7 @@ static HRESULT TransactedSnapshotImpl_EnsureReadEntry(
if
(
SUCCEEDED
(
hr
))
{
memcpy
(
&
This
->
entries
[
entry
].
data
,
&
data
,
sizeof
(
DirEntry
));
This
->
entries
[
entry
].
read
=
1
;
This
->
entries
[
entry
].
read
=
TRUE
;
}
}
...
...
@@ -4488,7 +4488,7 @@ static HRESULT TransactedSnapshotImpl_MakeStreamDirty(
}
if
(
SUCCEEDED
(
hr
))
This
->
entries
[
entry
].
stream_dirty
=
1
;
This
->
entries
[
entry
].
stream_dirty
=
TRUE
;
if
(
This
->
entries
[
entry
].
transactedParentEntry
!=
DIRENTRY_NULL
)
{
...
...
@@ -4498,7 +4498,7 @@ static HRESULT TransactedSnapshotImpl_MakeStreamDirty(
delete_ref
=
TransactedSnapshotImpl_CreateStubEntry
(
This
,
This
->
entries
[
entry
].
transactedParentEntry
);
if
(
delete_ref
!=
DIRENTRY_NULL
)
This
->
entries
[
delete_ref
].
deleted
=
1
;
This
->
entries
[
delete_ref
].
deleted
=
TRUE
;
This
->
entries
[
entry
].
transactedParentEntry
=
This
->
entries
[
entry
].
newTransactedParentEntry
=
DIRENTRY_NULL
;
}
...
...
@@ -4792,9 +4792,9 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
{
StorageBaseImpl_StreamSetSize
(
This
->
scratch
,
entry
->
stream_entry
,
zero
);
StorageBaseImpl_DestroyDirEntry
(
This
->
scratch
,
entry
->
stream_entry
);
entry
->
stream_dirty
=
0
;
entry
->
stream_dirty
=
FALSE
;
}
entry
->
dirty
=
0
;
entry
->
dirty
=
FALSE
;
entry
->
transactedParentEntry
=
entry
->
newTransactedParentEntry
;
}
}
...
...
@@ -4894,8 +4894,8 @@ static HRESULT TransactedSnapshotImpl_CreateDirEntry(StorageBaseImpl *base,
new_entry
=
&
This
->
entries
[
new_ref
];
new_entry
->
newTransactedParentEntry
=
new_entry
->
transactedParentEntry
=
DIRENTRY_NULL
;
new_entry
->
read
=
1
;
new_entry
->
dirty
=
1
;
new_entry
->
read
=
TRUE
;
new_entry
->
dirty
=
TRUE
;
memcpy
(
&
new_entry
->
data
,
newData
,
sizeof
(
DirEntry
));
*
index
=
new_ref
;
...
...
@@ -4920,7 +4920,7 @@ static HRESULT TransactedSnapshotImpl_WriteDirEntry(StorageBaseImpl *base,
if
(
index
!=
This
->
base
.
storageDirEntry
)
{
This
->
entries
[
index
].
dirty
=
1
;
This
->
entries
[
index
].
dirty
=
TRUE
;
if
(
data
->
size
.
QuadPart
==
0
&&
This
->
entries
[
index
].
transactedParentEntry
!=
DIRENTRY_NULL
)
...
...
@@ -4931,7 +4931,7 @@ static HRESULT TransactedSnapshotImpl_WriteDirEntry(StorageBaseImpl *base,
delete_ref
=
TransactedSnapshotImpl_CreateStubEntry
(
This
,
This
->
entries
[
index
].
transactedParentEntry
);
if
(
delete_ref
!=
DIRENTRY_NULL
)
This
->
entries
[
delete_ref
].
deleted
=
1
;
This
->
entries
[
delete_ref
].
deleted
=
TRUE
;
This
->
entries
[
index
].
transactedParentEntry
=
This
->
entries
[
index
].
newTransactedParentEntry
=
DIRENTRY_NULL
;
}
...
...
@@ -4972,7 +4972,7 @@ static HRESULT TransactedSnapshotImpl_DestroyDirEntry(StorageBaseImpl *base,
}
else
{
This
->
entries
[
index
].
deleted
=
1
;
This
->
entries
[
index
].
deleted
=
TRUE
;
}
return
S_OK
;
...
...
@@ -5048,7 +5048,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
This
->
entries
[
index
].
stream_entry
,
zero
);
StorageBaseImpl_DestroyDirEntry
(
This
->
scratch
,
This
->
entries
[
index
].
stream_entry
);
This
->
entries
[
index
].
stream_dirty
=
0
;
This
->
entries
[
index
].
stream_dirty
=
FALSE
;
}
else
if
(
This
->
entries
[
index
].
transactedParentEntry
!=
DIRENTRY_NULL
)
{
...
...
@@ -5056,7 +5056,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
delete_ref
=
TransactedSnapshotImpl_CreateStubEntry
(
This
,
This
->
entries
[
index
].
transactedParentEntry
);
if
(
delete_ref
!=
DIRENTRY_NULL
)
This
->
entries
[
delete_ref
].
deleted
=
1
;
This
->
entries
[
delete_ref
].
deleted
=
TRUE
;
This
->
entries
[
index
].
transactedParentEntry
=
This
->
entries
[
index
].
newTransactedParentEntry
=
DIRENTRY_NULL
;
}
...
...
@@ -6038,10 +6038,10 @@ HRESULT BlockChainStream_GetBlockAtOffset(BlockChainStream *This,
{
if
(
!
StorageImpl_WriteBigBlock
(
This
->
parentStorage
,
result
->
sector
,
result
->
data
))
return
STG_E_WRITEFAULT
;
result
->
dirty
=
0
;
result
->
dirty
=
FALSE
;
}
result
->
read
=
0
;
result
->
read
=
FALSE
;
result
->
index
=
index
;
result
->
sector
=
*
sector
;
}
...
...
@@ -6066,9 +6066,9 @@ BlockChainStream* BlockChainStream_Construct(
newStream
->
indexCacheLen
=
0
;
newStream
->
indexCacheSize
=
0
;
newStream
->
cachedBlocks
[
0
].
index
=
0xffffffff
;
newStream
->
cachedBlocks
[
0
].
dirty
=
0
;
newStream
->
cachedBlocks
[
0
].
dirty
=
FALSE
;
newStream
->
cachedBlocks
[
1
].
index
=
0xffffffff
;
newStream
->
cachedBlocks
[
1
].
dirty
=
0
;
newStream
->
cachedBlocks
[
1
].
dirty
=
FALSE
;
newStream
->
blockToEvict
=
0
;
if
(
FAILED
(
BlockChainStream_UpdateIndexCache
(
newStream
)))
...
...
@@ -6090,7 +6090,7 @@ HRESULT BlockChainStream_Flush(BlockChainStream* This)
if
(
This
->
cachedBlocks
[
i
].
dirty
)
{
if
(
StorageImpl_WriteBigBlock
(
This
->
parentStorage
,
This
->
cachedBlocks
[
i
].
sector
,
This
->
cachedBlocks
[
i
].
data
))
This
->
cachedBlocks
[
i
].
dirty
=
0
;
This
->
cachedBlocks
[
i
].
dirty
=
FALSE
;
else
return
STG_E_WRITEFAULT
;
}
...
...
@@ -6230,7 +6230,7 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
if
(
FAILED
(
StorageImpl_ReadBigBlock
(
This
->
parentStorage
,
cachedBlock
->
sector
,
cachedBlock
->
data
,
&
read
))
&&
!
read
)
return
STG_E_READFAULT
;
cachedBlock
->
read
=
1
;
cachedBlock
->
read
=
TRUE
;
}
memcpy
(
bufferWalker
,
cachedBlock
->
data
+
offsetInBlock
,
bytesToReadInBuffer
);
...
...
@@ -6318,8 +6318,8 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This,
memcpy
(
cachedBlock
->
data
+
offsetInBlock
,
bufferWalker
,
bytesToWrite
);
bytesWrittenAt
=
bytesToWrite
;
cachedBlock
->
read
=
1
;
cachedBlock
->
dirty
=
1
;
cachedBlock
->
read
=
TRUE
;
cachedBlock
->
dirty
=
TRUE
;
}
blockNoInSequence
++
;
...
...
@@ -6421,7 +6421,7 @@ static BOOL BlockChainStream_Shrink(BlockChainStream* This,
if
(
This
->
cachedBlocks
[
i
].
index
>=
numBlocks
)
{
This
->
cachedBlocks
[
i
].
index
=
0xffffffff
;
This
->
cachedBlocks
[
i
].
dirty
=
0
;
This
->
cachedBlocks
[
i
].
dirty
=
FALSE
;
}
}
...
...
dlls/ole32/storage32.h
View file @
37abf45e
...
...
@@ -523,8 +523,8 @@ typedef struct BlockChainBlock
{
ULONG
index
;
ULONG
sector
;
int
read
;
int
dirty
;
BOOL
read
;
BOOL
dirty
;
BYTE
data
[
MAX_BIG_BLOCK_SIZE
];
}
BlockChainBlock
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment