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
586e16de
Commit
586e16de
authored
Jan 03, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Document ScriptItemize. Get rid of the remaining tabs.
parent
f152153f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
22 deletions
+32
-22
usp10.c
dlls/usp10/usp10.c
+32
-22
No files found.
dlls/usp10/usp10.c
View file @
586e16de
...
@@ -208,12 +208,13 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
...
@@ -208,12 +208,13 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
*/
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
{
switch
(
fdwReason
)
{
switch
(
fdwReason
)
case
DLL_PROCESS_ATTACH
:
{
DisableThreadLibraryCalls
(
hInstDLL
);
case
DLL_PROCESS_ATTACH
:
break
;
DisableThreadLibraryCalls
(
hInstDLL
);
case
DLL_PROCESS_DETACH
:
break
;
break
;
case
DLL_PROCESS_DETACH
:
break
;
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -333,12 +334,12 @@ HRESULT WINAPI ScriptRecordDigitSubstitution(LCID locale, SCRIPT_DIGITSUBSTITUTE
...
@@ -333,12 +334,12 @@ HRESULT WINAPI ScriptRecordDigitSubstitution(LCID locale, SCRIPT_DIGITSUBSTITUTE
* CONTEXT or NONE in reality */
* CONTEXT or NONE in reality */
if
(
!
sds
)
return
E_POINTER
;
if
(
!
sds
)
return
E_POINTER
;
locale
=
ConvertDefaultLocale
(
locale
);
locale
=
ConvertDefaultLocale
(
locale
);
if
(
!
IsValidLocale
(
locale
,
LCID_INSTALLED
))
if
(
!
IsValidLocale
(
locale
,
LCID_INSTALLED
))
return
E_INVALIDARG
;
return
E_INVALIDARG
;
plgid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
locale
));
plgid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
locale
));
sds
->
TraditionalDigitLanguage
=
plgid
;
sds
->
TraditionalDigitLanguage
=
plgid
;
...
@@ -420,9 +421,23 @@ HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE *sds,
...
@@ -420,9 +421,23 @@ HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE *sds,
/***********************************************************************
/***********************************************************************
* ScriptItemize (USP10.@)
* ScriptItemize (USP10.@)
*
*
* Split a Unicode string into shapeable parts.
*
* PARAMS
* pwcInChars [I] String to split.
* cInChars [I] Number of characters in pwcInChars.
* cMaxItems [I] Maximum number of items to return.
* psControl [I] Pointer to a SCRIPT_CONTROL structure.
* psState [I] Pointer to a SCRIPT_STATE structure.
* pItems [O] Buffer to receive SCRIPT_ITEM structures.
* pcItems [O] Number of script items returned.
*
* RETURNS
* Success: S_OK
* Failure: Non-zero HRESULT value.
*/
*/
HRESULT
WINAPI
ScriptItemize
(
const
WCHAR
*
pwcInChars
,
int
cInChars
,
int
cMaxItems
,
HRESULT
WINAPI
ScriptItemize
(
const
WCHAR
*
pwcInChars
,
int
cInChars
,
int
cMaxItems
,
const
SCRIPT_CONTROL
*
psControl
,
const
SCRIPT_STATE
*
psState
,
const
SCRIPT_CONTROL
*
psControl
,
const
SCRIPT_STATE
*
psState
,
SCRIPT_ITEM
*
pItems
,
int
*
pcItems
)
SCRIPT_ITEM
*
pItems
,
int
*
pcItems
)
{
{
...
@@ -479,7 +494,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
...
@@ -479,7 +494,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
New_Script
=
Script_Latin
;
New_Script
=
Script_Latin
;
else
else
New_Script
=
SCRIPT_UNDEFINED
;
New_Script
=
SCRIPT_UNDEFINED
;
if
(
New_Script
!=
pItems
[
index
].
a
.
eScript
)
if
(
New_Script
!=
pItems
[
index
].
a
.
eScript
)
{
{
TRACE
(
"New_Script=%d, eScript=%d "
,
New_Script
,
pItems
[
index
].
a
.
eScript
);
TRACE
(
"New_Script=%d, eScript=%d "
,
New_Script
,
pItems
[
index
].
a
.
eScript
);
...
@@ -714,12 +729,10 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai
...
@@ -714,12 +729,10 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai
int
runningX
=
0
;
int
runningX
=
0
;
int
runningCp
=
0
;
int
runningCp
=
0
;
StringAnalysis
*
analysis
=
ssa
;
StringAnalysis
*
analysis
=
ssa
;
TRACE
(
"(%p), %d, %d, (%p)
\n
"
,
ssa
,
icp
,
fTrailing
,
pX
);
TRACE
(
"(%p), %d, %d, (%p)
\n
"
,
ssa
,
icp
,
fTrailing
,
pX
);
if
(
!
ssa
||
!
pX
)
if
(
!
ssa
||
!
pX
)
return
S_FALSE
;
{
return
1
;
}
/* icp out of range */
/* icp out of range */
if
(
icp
<
0
)
if
(
icp
<
0
)
...
@@ -767,17 +780,14 @@ HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int* piCh,
...
@@ -767,17 +780,14 @@ HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int* piCh,
TRACE
(
"(%p), %d, (%p), (%p)
\n
"
,
ssa
,
iX
,
piCh
,
piTrailing
);
TRACE
(
"(%p), %d, (%p), (%p)
\n
"
,
ssa
,
iX
,
piCh
,
piTrailing
);
if
(
!
ssa
||
!
piCh
||
!
piTrailing
)
if
(
!
ssa
||
!
piCh
||
!
piTrailing
)
return
S_FALSE
;
{
return
1
;
}
/* out of range */
/* out of range */
if
(
iX
<
0
)
if
(
iX
<
0
)
{
{
*
piCh
=
-
1
;
*
piCh
=
-
1
;
*
piTrailing
=
TRUE
;
*
piTrailing
=
TRUE
;
return
S_OK
;
return
S_OK
;
}
}
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
...
@@ -917,7 +927,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -917,7 +927,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
*
piCP
=
cChars
;
*
piCP
=
cChars
;
*
piTrailing
=
FALSE
;
*
piTrailing
=
FALSE
;
return
S_OK
;
return
S_OK
;
}
}
fAvePosX
=
fMaxPosX
/
cGlyphs
;
fAvePosX
=
fMaxPosX
/
cGlyphs
;
iPosX
=
fAvePosX
;
iPosX
=
fAvePosX
;
...
@@ -927,7 +937,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
...
@@ -927,7 +937,7 @@ HRESULT WINAPI ScriptXtoCP(int iX,
*
piTrailing
=
0
;
*
piTrailing
=
0
;
else
else
*
piTrailing
=
1
;
/* yep we are over halfway */
*
piTrailing
=
1
;
/* yep we are over halfway */
*
piCP
=
item
-
1
;
/* Return character position */
*
piCP
=
item
-
1
;
/* Return character position */
TRACE
(
"*piCP=%d iPposX=%d
\n
"
,
*
piCP
,
iPosX
);
TRACE
(
"*piCP=%d iPposX=%d
\n
"
,
*
piCP
,
iPosX
);
return
S_OK
;
return
S_OK
;
...
...
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