Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
128e4575
Commit
128e4575
authored
Nov 20, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use BOOL type where appropriate.
parent
ed858386
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
18 deletions
+15
-18
olepicture.c
dlls/oleaut32/olepicture.c
+11
-11
tmarshal.c
dlls/oleaut32/tmarshal.c
+3
-6
typelib.c
dlls/oleaut32/typelib.c
+1
-1
No files found.
dlls/oleaut32/olepicture.c
View file @
128e4575
...
...
@@ -1527,9 +1527,9 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
return
hr
;
}
static
int
serializeBMP
(
HBITMAP
hBitmap
,
void
**
ppBuffer
,
unsigned
int
*
pLength
)
static
BOOL
serializeBMP
(
HBITMAP
hBitmap
,
void
**
ppBuffer
,
unsigned
int
*
pLength
)
{
int
iSuccess
=
0
;
BOOL
success
=
FALSE
;
HDC
hDC
;
BITMAPINFO
*
pInfoBitmap
;
int
iNumPaletteEntries
;
...
...
@@ -1585,17 +1585,17 @@ static int serializeBMP(HBITMAP hBitmap, void ** ppBuffer, unsigned int * pLengt
sizeof
(
BITMAPINFOHEADER
)
+
iNumPaletteEntries
*
sizeof
(
RGBQUAD
),
pPixelData
,
pInfoBitmap
->
bmiHeader
.
biSizeImage
);
iSuccess
=
1
;
success
=
TRUE
;
HeapFree
(
GetProcessHeap
(),
0
,
pPixelData
);
HeapFree
(
GetProcessHeap
(),
0
,
pInfoBitmap
);
return
iS
uccess
;
return
s
uccess
;
}
static
int
serializeIcon
(
HICON
hIcon
,
void
**
ppBuffer
,
unsigned
int
*
pLength
)
static
BOOL
serializeIcon
(
HICON
hIcon
,
void
**
ppBuffer
,
unsigned
int
*
pLength
)
{
ICONINFO
infoIcon
;
int
iSuccess
=
0
;
BOOL
success
=
FALSE
;
*
ppBuffer
=
NULL
;
*
pLength
=
0
;
if
(
GetIconInfo
(
hIcon
,
&
infoIcon
))
{
...
...
@@ -1717,7 +1717,7 @@ static int serializeIcon(HICON hIcon, void ** ppBuffer, unsigned int * pLength)
/* Write out everything produced so far to the stream */
*
ppBuffer
=
pIconData
;
*
pLength
=
iDataSize
;
iSuccess
=
1
;
success
=
TRUE
;
}
else
{
/*
printf("ERROR: unable to get bitmap information via GetDIBits() (error %u)\n",
...
...
@@ -1740,7 +1740,7 @@ static int serializeIcon(HICON hIcon, void ** ppBuffer, unsigned int * pLength)
printf
(
"ERROR: Unable to get icon information (error %u)
\n
"
,
GetLastError
());
}
return
iS
uccess
;
return
s
uccess
;
}
static
HRESULT
WINAPI
OLEPictureImpl_Save
(
...
...
@@ -1751,7 +1751,7 @@ static HRESULT WINAPI OLEPictureImpl_Save(
unsigned
int
iDataSize
;
DWORD
header
[
2
];
ULONG
dummy
;
int
iSerializeResult
=
0
;
BOOL
serializeResult
=
FALSE
;
OLEPictureImpl
*
This
=
impl_from_IPersistStream
(
iface
);
TRACE
(
"%p %p %d
\n
"
,
This
,
pStm
,
fClearDirty
);
...
...
@@ -1785,7 +1785,7 @@ static HRESULT WINAPI OLEPictureImpl_Save(
if
(
This
->
bIsDirty
||
!
This
->
data
)
{
switch
(
This
->
keepOrigFormat
?
This
->
loadtime_format
:
BITMAP_FORMAT_BMP
)
{
case
BITMAP_FORMAT_BMP
:
iS
erializeResult
=
serializeBMP
(
This
->
desc
.
u
.
bmp
.
hbitmap
,
&
pIconData
,
&
iDataSize
);
s
erializeResult
=
serializeBMP
(
This
->
desc
.
u
.
bmp
.
hbitmap
,
&
pIconData
,
&
iDataSize
);
break
;
case
BITMAP_FORMAT_JPEG
:
FIXME
(
"(%p,%p,%d), PICTYPE_BITMAP (format JPEG) not implemented!
\n
"
,
This
,
pStm
,
fClearDirty
);
...
...
@@ -1801,7 +1801,7 @@ static HRESULT WINAPI OLEPictureImpl_Save(
break
;
}
if
(
!
iS
erializeResult
)
if
(
!
s
erializeResult
)
{
hResult
=
E_FAIL
;
break
;
...
...
dlls/oleaut32/tmarshal.c
View file @
128e4575
...
...
@@ -647,14 +647,11 @@ _xsize(const TYPEDESC *td, ITypeInfo *tinfo) {
}
/* Whether we pass this type by reference or by value */
static
int
static
BOOL
_passbyref
(
const
TYPEDESC
*
td
,
ITypeInfo
*
tinfo
)
{
if
(
td
->
vt
==
VT_USERDEFINED
||
return
(
td
->
vt
==
VT_USERDEFINED
||
td
->
vt
==
VT_VARIANT
||
td
->
vt
==
VT_PTR
)
return
1
;
return
0
;
td
->
vt
==
VT_PTR
);
}
static
HRESULT
...
...
dlls/oleaut32/typelib.c
View file @
128e4575
...
...
@@ -3137,7 +3137,7 @@ static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
/* Read in NE header */
nehdoffset
=
LZSeek
(
lzfd
,
0
,
SEEK_CUR
);
if
(
sizeof
(
nehd
)
!=
LZRead
(
lzfd
,
(
LPSTR
)
&
nehd
,
sizeof
(
nehd
)
)
)
return
0
;
if
(
sizeof
(
nehd
)
!=
LZRead
(
lzfd
,
(
LPSTR
)
&
nehd
,
sizeof
(
nehd
)
)
)
return
FALSE
;
resTabSize
=
nehd
.
ne_restab
-
nehd
.
ne_rsrctab
;
if
(
!
resTabSize
)
...
...
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