usp10: Document ScriptItemize. Get rid of the remaining tabs.

This commit is contained in:
Hans Leidekker 2007-01-03 12:12:43 +01:00 committed by Alexandre Julliard
parent f152153f15
commit 586e16de76
1 changed files with 32 additions and 22 deletions

View File

@ -208,12 +208,13 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
@ -420,6 +421,20 @@ HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE *sds,
/***********************************************************************
* 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,
const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
@ -714,12 +729,10 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai
int runningX = 0;
int runningCp = 0;
StringAnalysis* analysis = ssa;
TRACE("(%p), %d, %d, (%p)\n", ssa, icp, fTrailing, pX);
if(!ssa || !pX)
{
return 1;
}
if (!ssa || !pX) return S_FALSE;
/* icp out of range */
if(icp < 0)
@ -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);
if(!ssa || !piCh || !piTrailing)
{
return 1;
}
if (!ssa || !piCh || !piTrailing) return S_FALSE;
/* out of range */
if(iX < 0)
{
*piCh = -1;
*piTrailing = TRUE;
return S_OK;
return S_OK;
}
for(i=0; i<analysis->numItems; i++)