From: Henri Verbeet Subject: [PATCH 3/5] usp10: Avoid LPCVOID. Message-Id: <1490305783-17458-3-git-send-email-hverbeet@codeweavers.com> Date: Thu, 23 Mar 2017 22:49:41 +0100 And cleanup a few style issues along the way. Signed-off-by: Henri Verbeet --- dlls/usp10/opentype.c | 9 +++++---- dlls/usp10/shape.c | 3 ++- dlls/usp10/usp10_internal.h | 13 +++++++------ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index e3c7a56..6cc1b5d 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -815,7 +815,7 @@ void OpenType_GDEF_UpdateGlyphProps(ScriptCache *psc, const WORD *pwGlyphs, cons **********/ static INT GSUB_apply_lookup(const OT_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count); -static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) +static int GSUB_is_glyph_covered(const void *table, unsigned int glyph) { const OT_CoverageFormat1* cf1; @@ -1486,7 +1486,8 @@ static INT GSUB_apply_lookup(const OT_LookupList* lookup, INT lookup_index, WORD return GSUB_E_NOGLYPH; } -INT OpenType_apply_GSUB_lookup(LPCVOID table, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +int OpenType_apply_GSUB_lookup(const void *table, unsigned int lookup_index, WORD *glyphs, + unsigned int glyph_index, int write_dir, int *glyph_count) { const GSUB_Header *header = (const GSUB_Header *)table; const OT_LookupList *lookup = (const OT_LookupList*)((const BYTE*)header + GET_BE_WORD(header->LookupList)); @@ -2769,7 +2770,7 @@ HRESULT OpenType_GetFontLanguageTags(ScriptCache *psc, OPENTYPE_TAG script_tag, } -static void GSUB_initialize_feature_cache(LPCVOID table, LoadedLanguage *language) +static void GSUB_initialize_feature_cache(const void *table, LoadedLanguage *language) { int i; @@ -2812,7 +2813,7 @@ static void GSUB_initialize_feature_cache(LPCVOID table, LoadedLanguage *languag } } -static void GPOS_expand_feature_cache(LPCVOID table, LoadedLanguage *language) +static void GPOS_expand_feature_cache(const void *table, LoadedLanguage *language) { int i, count; const OT_LangSys *lang = language->gpos_table; diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 7ed2142..2f47f89 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -542,7 +542,8 @@ static const ScriptShapeData ShapingData[] = extern scriptData scriptInformation[]; -static INT GSUB_apply_feature_all_lookups(LPCVOID header, LoadedFeature *feature, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +static int GSUB_apply_feature_all_lookups(const void *header, LoadedFeature *feature, + WORD *glyphs, unsigned int glyph_index, int write_dir, int *glyph_count) { int i; int out_index = GSUB_E_NOGLYPH; diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 3ad6d10..d4d3434 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -144,15 +144,15 @@ enum usp10_script typedef struct { OPENTYPE_TAG tag; CHAR tableType; - LPCVOID feature; + const void *feature; INT lookup_count; WORD *lookups; } LoadedFeature; typedef struct { OPENTYPE_TAG tag; - LPCVOID gsub_table; - LPCVOID gpos_table; + const void *gsub_table; + const void *gpos_table; BOOL features_initialized; INT feature_count; LoadedFeature *features; @@ -160,8 +160,8 @@ typedef struct { typedef struct { OPENTYPE_TAG tag; - LPCVOID gsub_table; - LPCVOID gpos_table; + const void *gsub_table; + const void *gpos_table; LoadedLanguage default_language; BOOL languages_initialized; INT language_count; @@ -273,7 +273,8 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT DWORD OpenType_CMAP_GetGlyphIndex(HDC hdc, ScriptCache *psc, DWORD utf32c, LPWORD pgi, DWORD flags) DECLSPEC_HIDDEN; void OpenType_GDEF_UpdateGlyphProps(ScriptCache *psc, const WORD *pwGlyphs, const WORD cGlyphs, WORD* pwLogClust, const WORD cChars, SCRIPT_GLYPHPROP *pGlyphProp) DECLSPEC_HIDDEN; -INT OpenType_apply_GSUB_lookup(LPCVOID table, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) DECLSPEC_HIDDEN; +int OpenType_apply_GSUB_lookup(const void *table, unsigned int lookup_index, WORD *glyphs, + unsigned int glyph_index, int write_dir, int *glyph_count) DECLSPEC_HIDDEN; unsigned int OpenType_apply_GPOS_lookup(const ScriptCache *psc, const OUTLINETEXTMETRICW *otm, const LOGFONTW *logfont, const SCRIPT_ANALYSIS *analysis, int *advance, unsigned int lookup_index, const WORD *glyphs, unsigned int glyph_index, unsigned int glyph_count, GOFFSET *goffset) DECLSPEC_HIDDEN; -- 2.1.4