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
89a3ad76
Commit
89a3ad76
authored
Sep 12, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Sep 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Add explicit "!= S_OK" to expressions that use HRESULTs as booleans.
parent
d5614bff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
usp10.c
dlls/usp10/usp10.c
+20
-8
No files found.
dlls/usp10/usp10.c
View file @
89a3ad76
...
@@ -225,7 +225,8 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
...
@@ -225,7 +225,8 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
if
(
!
hdc
)
return
E_PENDING
;
if
(
!
hdc
)
return
E_PENDING
;
if
(
!
(
sc
=
heap_alloc_zero
(
sizeof
(
ScriptCache
))))
return
E_OUTOFMEMORY
;
if
(
!
(
sc
=
heap_alloc_zero
(
sizeof
(
ScriptCache
))))
return
E_OUTOFMEMORY
;
if
((
ret
=
init_script_cache
(
hdc
,
sc
)))
ret
=
init_script_cache
(
hdc
,
sc
);
if
(
ret
!=
S_OK
)
{
{
heap_free
(
sc
);
heap_free
(
sc
);
return
ret
;
return
ret
;
...
@@ -337,7 +338,10 @@ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPR
...
@@ -337,7 +338,10 @@ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPR
TRACE
(
"%p,%p,%p
\n
"
,
hdc
,
psc
,
sfp
);
TRACE
(
"%p,%p,%p
\n
"
,
hdc
,
psc
,
sfp
);
if
(
!
sfp
)
return
E_INVALIDARG
;
if
(
!
sfp
)
return
E_INVALIDARG
;
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
sfp
->
cBytes
!=
sizeof
(
SCRIPT_FONTPROPERTIES
))
if
(
sfp
->
cBytes
!=
sizeof
(
SCRIPT_FONTPROPERTIES
))
return
E_INVALIDARG
;
return
E_INVALIDARG
;
...
@@ -625,7 +629,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
...
@@ -625,7 +629,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
hr
=
ScriptItemize
(
pString
,
cString
,
num_items
,
psControl
,
psState
,
analysis
->
pItem
,
hr
=
ScriptItemize
(
pString
,
cString
,
num_items
,
psControl
,
psState
,
analysis
->
pItem
,
&
analysis
->
numItems
);
&
analysis
->
numItems
);
}
}
if
(
hr
)
goto
error
;
if
(
hr
!=
S_OK
)
goto
error
;
if
((
analysis
->
logattrs
=
heap_alloc
(
sizeof
(
SCRIPT_LOGATTR
)
*
cString
)))
if
((
analysis
->
logattrs
=
heap_alloc
(
sizeof
(
SCRIPT_LOGATTR
)
*
cString
)))
ScriptBreak
(
pString
,
cString
,
(
SCRIPT_STRING_ANALYSIS
)
analysis
,
analysis
->
logattrs
);
ScriptBreak
(
pString
,
cString
,
(
SCRIPT_STRING_ANALYSIS
)
analysis
,
analysis
->
logattrs
);
...
@@ -1248,7 +1252,9 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
...
@@ -1248,7 +1252,9 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
if
(
!
psva
||
!
pcGlyphs
)
return
E_INVALIDARG
;
if
(
!
psva
||
!
pcGlyphs
)
return
E_INVALIDARG
;
if
(
cChars
>
cMaxGlyphs
)
return
E_OUTOFMEMORY
;
if
(
cChars
>
cMaxGlyphs
)
return
E_OUTOFMEMORY
;
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
*
pcGlyphs
=
cChars
;
*
pcGlyphs
=
cChars
;
...
@@ -1315,7 +1321,9 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
...
@@ -1315,7 +1321,9 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
debugstr_wn
(
pwGlyphs
,
cGlyphs
),
cGlyphs
,
psva
,
psa
,
piAdvance
);
debugstr_wn
(
pwGlyphs
,
cGlyphs
),
cGlyphs
,
psva
,
psa
,
piAdvance
);
if
(
!
psva
)
return
E_INVALIDARG
;
if
(
!
psva
)
return
E_INVALIDARG
;
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
hfont
=
select_cached_font
(
psc
);
hfont
=
select_cached_font
(
psc
);
...
@@ -1388,7 +1396,8 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars
...
@@ -1388,7 +1396,8 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars
TRACE
(
"(%p,%p,%s,%d,0x%x,%p)
\n
"
,
hdc
,
psc
,
debugstr_wn
(
pwcInChars
,
cChars
),
TRACE
(
"(%p,%p,%s,%d,0x%x,%p)
\n
"
,
hdc
,
psc
,
debugstr_wn
(
pwcInChars
,
cChars
),
cChars
,
dwFlags
,
pwOutGlyphs
);
cChars
,
dwFlags
,
pwOutGlyphs
);
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
hfont
=
select_cached_font
(
psc
);
hfont
=
select_cached_font
(
psc
);
if
(
GetGlyphIndicesW
(
get_cache_hdc
(
psc
),
pwcInChars
,
cChars
,
pwOutGlyphs
,
0
)
==
GDI_ERROR
)
if
(
GetGlyphIndicesW
(
get_cache_hdc
(
psc
),
pwcInChars
,
cChars
,
pwOutGlyphs
,
0
)
==
GDI_ERROR
)
...
@@ -1447,7 +1456,9 @@ HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *height)
...
@@ -1447,7 +1456,9 @@ HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *height)
TRACE
(
"(%p, %p, %p)
\n
"
,
hdc
,
psc
,
height
);
TRACE
(
"(%p, %p, %p)
\n
"
,
hdc
,
psc
,
height
);
if
(
!
height
)
return
E_INVALIDARG
;
if
(
!
height
)
return
E_INVALIDARG
;
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
*
height
=
get_cache_height
(
psc
);
*
height
=
get_cache_height
(
psc
);
return
S_OK
;
return
S_OK
;
...
@@ -1475,7 +1486,8 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB
...
@@ -1475,7 +1486,8 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB
TRACE
(
"(%p, %p, 0x%04x, %p)
\n
"
,
hdc
,
psc
,
glyph
,
abc
);
TRACE
(
"(%p, %p, 0x%04x, %p)
\n
"
,
hdc
,
psc
,
glyph
,
abc
);
if
((
hr
=
get_script_cache
(
hdc
,
psc
)))
return
hr
;
hr
=
get_script_cache
(
hdc
,
psc
);
if
(
hr
!=
S_OK
)
return
hr
;
hfont
=
select_cached_font
(
psc
);
hfont
=
select_cached_font
(
psc
);
if
(
!
GetCharABCWidthsI
(
get_cache_hdc
(
psc
),
0
,
1
,
&
glyph
,
abc
))
hr
=
E_HANDLE
;
if
(
!
GetCharABCWidthsI
(
get_cache_hdc
(
psc
),
0
,
1
,
&
glyph
,
abc
))
hr
=
E_HANDLE
;
...
...
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