Indices is the plural used by related APIs so use it for consistency.
Signed-off-by: Francois Gouget fgouget@free.fr --- dlls/usp10/bidi.c | 14 +++++------ dlls/usp10/shape.c | 48 ++++++++++++++++++------------------- dlls/usp10/usp10.c | 18 +++++++------- dlls/usp10/usp10_internal.h | 4 ++-- 4 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/dlls/usp10/bidi.c b/dlls/usp10/bidi.c index 7de2be51d7c..34ca955dcb1 100644 --- a/dlls/usp10/bidi.c +++ b/dlls/usp10/bidi.c @@ -1149,7 +1149,7 @@ BOOL BIDI_DetermineLevels( return TRUE; }
-/* reverse cch indexes */ +/* reverse cch indices */ static void reverse(int *pidx, int cch) { int temp; @@ -1185,7 +1185,7 @@ static void reverse(int *pidx, int cch)
Note: this should be applied a line at a time -------------------------------------------------------------------------*/ -int BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) +int BIDI_ReorderV2lLevel(int level, int *pIndices, const BYTE* plevel, int cch, BOOL fReverse) { int ich = 0;
@@ -1200,19 +1200,19 @@ int BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B } else if (plevel[ich] > level) { - ich += BIDI_ReorderV2lLevel(level + 1, pIndexs + ich, plevel + ich, + ich += BIDI_ReorderV2lLevel(level + 1, pIndices + ich, plevel + ich, cch - ich, fReverse) - 1; } } if (fReverse) { - reverse(pIndexs, ich); + reverse(pIndices, ich); } return ich; }
/* Applies the reorder in reverse. Taking an already reordered string and returning the original */ -int BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) +int BIDI_ReorderL2vLevel(int level, int *pIndices, const BYTE* plevel, int cch, BOOL fReverse) { int ich = 0; int newlevel = -1; @@ -1229,7 +1229,7 @@ int BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B } if (fReverse) { - reverse(pIndexs, ich); + reverse(pIndices, ich); }
if (newlevel >= 0) @@ -1239,7 +1239,7 @@ int BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B if (plevel[ich] < level) break; else if (plevel[ich] > level) - ich += BIDI_ReorderL2vLevel(level + 1, pIndexs + ich, plevel + ich, + ich += BIDI_ReorderL2vLevel(level + 1, pIndices + ich, plevel + ich, cch - ich, fReverse) - 1; }
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 3827000122a..86e80aacd5f 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -805,7 +805,7 @@ static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int ch } }
- /* renumber trailing indexes */ + /* renumber trailing indices */ for (i = target_index; i < chars && i >= 0; i += cluster_dir) { if (pwLogClust[i] != target_glyph) @@ -1971,7 +1971,7 @@ static void SecondReorder_Like_Tamil(const WCHAR *chars, const IndicSyllable *s, }
-static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT index, INT shift) +static inline void shift_syllable_glyph_indices(IndicSyllable *glyph_index, INT index, INT shift) { if (shift == 0) return; @@ -2005,7 +2005,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); - shift_syllable_glyph_indexs(glyph_index,index,*pcGlyphs - prevCount); + shift_syllable_glyph_indices(glyph_index,index,*pcGlyphs - prevCount); index = nextIndex; } else @@ -2040,7 +2040,7 @@ static void Apply_Indic_PreBase(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); - shift_syllable_glyph_indexs(glyph_index, index + glyph_index->start + g_offset, (*pcGlyphs - prevCount)); + shift_syllable_glyph_indices(glyph_index, index + glyph_index->start + g_offset, (*pcGlyphs - prevCount)); g_offset += (*pcGlyphs - prevCount); }
@@ -2060,7 +2060,7 @@ static void Apply_Indic_Rphf(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WC if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); - shift_syllable_glyph_indexs(glyph_index,glyph_index->ralf,*pcGlyphs - prevCount); + shift_syllable_glyph_indices(glyph_index,glyph_index->ralf,*pcGlyphs - prevCount); } } } @@ -2108,7 +2108,7 @@ static void Apply_Indic_PostBase(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); - shift_syllable_glyph_indexs(glyph_index,index+glyph_index->start+g_offset, (*pcGlyphs - prevCount)); + shift_syllable_glyph_indices(glyph_index,index+glyph_index->start+g_offset, (*pcGlyphs - prevCount)); g_offset += (*pcGlyphs - prevCount); } else if (!modern) @@ -2138,70 +2138,70 @@ static void ShapeIndicSyllables(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, BOOL pref = (load_OT_feature(hdc, psa, psc, FEATURE_GSUB_TABLE, "pref") != NULL); BOOL blwf = (load_OT_feature(hdc, psa, psc, FEATURE_GSUB_TABLE, "blwf") != NULL); BOOL half = (load_OT_feature(hdc, psa, psc, FEATURE_GSUB_TABLE, "half") != NULL); - IndicSyllable glyph_indexs; + IndicSyllable glyph_indices;
for (c = 0; c < syllable_count; c++) { int old_end; - memcpy(&glyph_indexs, &syllables[c], sizeof(IndicSyllable)); - shift_syllable_glyph_indexs(&glyph_indexs, -1, overall_shift); - old_end = glyph_indexs.end; + memcpy(&glyph_indices, &syllables[c], sizeof(IndicSyllable)); + shift_syllable_glyph_indices(&glyph_indices, -1, overall_shift); + old_end = glyph_indices.end;
if (locl) { TRACE("applying feature locl\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, locl); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, locl); } if (nukt) { TRACE("applying feature nukt\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, nukt); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, nukt); } if (akhn) { TRACE("applying feature akhn\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, akhn); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, akhn); }
if (rphf) - Apply_Indic_Rphf(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs); + Apply_Indic_Rphf(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices); if (rkrf) { TRACE("applying feature rkrf\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, rkrf); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, rkrf); } if (pref) - Apply_Indic_PostBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, modern, "pref"); + Apply_Indic_PostBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, modern, "pref"); if (blwf) { if (!modern) - Apply_Indic_PreBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, "blwf"); + Apply_Indic_PreBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, "blwf");
- Apply_Indic_PostBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, modern, "blwf"); + Apply_Indic_PostBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, modern, "blwf");
} if (half) - Apply_Indic_PreBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, "half"); + Apply_Indic_PreBase(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, "half"); if (pstf) { TRACE("applying feature pstf\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, pstf); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, pstf); } if (vatu) { TRACE("applying feature vatu\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, vatu); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, vatu); } if (cjct) { TRACE("applying feature cjct\n"); - Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indexs, cjct); + Apply_Indic_BasicForm(hdc, psc, psa, pwChars, cChars, &syllables[c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, cjct); }
if (second_reorder) - second_reorder(pwChars, &syllables[c], pwOutGlyphs, &glyph_indexs, lexical); + second_reorder(pwChars, &syllables[c], pwOutGlyphs, &glyph_indices, lexical);
- overall_shift += glyph_indexs.end - old_end; + overall_shift += glyph_indices.end - old_end; } }
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 3cc6665c2b9..f66e85cc485 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3748,7 +3748,7 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB */ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *logtovis) { - int* indexs; + int* indices; int ich;
TRACE("(%d, %p, %p, %p)\n", runs, level, vistolog, logtovis); @@ -3756,31 +3756,31 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log if (!level || (!vistolog && !logtovis)) return E_INVALIDARG;
- if (!(indexs = heap_calloc(runs, sizeof(*indexs)))) + if (!(indices = heap_calloc(runs, sizeof(*indices)))) return E_OUTOFMEMORY;
if (vistolog) { for( ich = 0; ich < runs; ich++) - indexs[ich] = ich; + indices[ich] = ich;
ich = 0; while (ich < runs) - ich += BIDI_ReorderV2lLevel(0, indexs+ich, level+ich, runs - ich, FALSE); - memcpy(vistolog, indexs, runs * sizeof(*vistolog)); + ich += BIDI_ReorderV2lLevel(0, indices+ich, level+ich, runs - ich, FALSE); + memcpy(vistolog, indices, runs * sizeof(*vistolog)); }
if (logtovis) { for( ich = 0; ich < runs; ich++) - indexs[ich] = ich; + indices[ich] = ich;
ich = 0; while (ich < runs) - ich += BIDI_ReorderL2vLevel(0, indexs+ich, level+ich, runs - ich, FALSE); - memcpy(logtovis, indexs, runs * sizeof(*logtovis)); + ich += BIDI_ReorderL2vLevel(0, indices+ich, level+ich, runs - ich, FALSE); + memcpy(logtovis, indices, runs * sizeof(*logtovis)); } - heap_free(indexs); + heap_free(indices);
return S_OK; } diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index bd55d8694f1..7f31e8f83f6 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -253,8 +253,8 @@ BOOL BIDI_DetermineLevels(const WCHAR *string, unsigned int count, const SCRIPT_ const SCRIPT_CONTROL *c, WORD *levels, WORD *overrides) DECLSPEC_HIDDEN; BOOL BIDI_GetStrengths(const WCHAR *string, unsigned int count, const SCRIPT_CONTROL *c, WORD *strength) DECLSPEC_HIDDEN; -INT BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; -INT BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; +INT BIDI_ReorderV2lLevel(int level, int *pIndices, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; +INT BIDI_ReorderL2vLevel(int level, int *pIndices, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust) DECLSPEC_HIDDEN; void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, INT cChars, WORD *pwLogClust) DECLSPEC_HIDDEN; void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WORD* pwGlyphs, INT cGlyphs, int *piAdvance, GOFFSET *pGoffset ) DECLSPEC_HIDDEN;