[aat] Update previous commits for rebase on master

This commit is contained in:
Behdad Esfahbod 2018-01-08 14:32:55 +00:00
parent a0175e75bc
commit 7c7cb42d81
3 changed files with 21 additions and 26 deletions

View File

@ -50,13 +50,13 @@ struct BinSearchHeader
}
protected:
USHORT unitSize; /* Size of a lookup unit for this search in bytes. */
USHORT nUnits; /* Number of units of the preceding size to be searched. */
USHORT searchRange; /* The value of unitSize times the largest power of 2
UINT16 unitSize; /* Size of a lookup unit for this search in bytes. */
UINT16 nUnits; /* Number of units of the preceding size to be searched. */
UINT16 searchRange; /* The value of unitSize times the largest power of 2
* that is less than or equal to the value of nUnits. */
USHORT entrySelector; /* The log base 2 of the largest power of 2 less than
UINT16 entrySelector; /* The log base 2 of the largest power of 2 less than
* or equal to the value of nUnits. */
USHORT rangeShift; /* The value of unitSize times the difference of the
UINT16 rangeShift; /* The value of unitSize times the difference of the
* value of nUnits minus the largest power of 2 less
* than or equal to the value of nUnits. */
public:
@ -108,7 +108,7 @@ struct BinSearchArrayOf
template <typename T>
inline Type *bsearch (const T &key) const
{
return ::bsearch (&key, bytes, header.nUnits, header.unitSize, (hb_compare_func_t) Type::cmp);
return ::bsearch (&key, bytes, header.nUnits, header.unitSize, Type::cmp);
}
private:
@ -122,7 +122,7 @@ struct BinSearchArrayOf
protected:
BinSearchHeader header;
BYTE bytes[VAR];
UINT8 bytes[VAR];
public:
DEFINE_SIZE_ARRAY (10, bytes);
};

View File

@ -104,11 +104,11 @@ struct Feature
}
public:
USHORT featureType; /* The type of feature. */
USHORT featureSetting; /* The feature's setting (aka selector). */
ULONG enableFlags; /* Flags for the settings that this feature
UINT16 featureType; /* The type of feature. */
UINT16 featureSetting; /* The feature's setting (aka selector). */
UINT32 enableFlags; /* Flags for the settings that this feature
* and setting enables. */
ULONG disableFlags; /* Complement of flags for the settings that this
UINT32 disableFlags; /* Complement of flags for the settings that this
* feature and setting disable. */
public:
@ -160,9 +160,9 @@ struct ChainSubtable
}
protected:
UINT length; /* Total subtable length, including this header. */
UINT coverage; /* Coverage flags and subtable type. */
ULONG subFeatureFlags;/* The 32-bit mask identifying which subtable this is. */
UINT length; /* Total subtable length, including this header. */
UINT coverage; /* Coverage flags and subtable type. */
UINT32 subFeatureFlags;/* The 32-bit mask identifying which subtable this is. */
union {
RearrangementSubtable rearrangement;
ContextualSubtable contextual;
@ -204,10 +204,10 @@ struct Chain
}
protected:
ULONG defaultFlags; /* The default specification for subtables. */
ULONG length; /* Total byte count, including this header. */
UINT featureCount; /* Number of feature subtable entries. */
UINT subtableCount; /* The number of subtables in the chain. */
UINT32 defaultFlags; /* The default specification for subtables. */
UINT32 length; /* Total byte count, including this header. */
UINT featureCount; /* Number of feature subtable entries. */
UINT subtableCount; /* The number of subtables in the chain. */
Feature featureZ[VAR]; /* Features. */
ChainSubtable<UINT> subtableX[VAR]; /* Subtables. */
@ -251,7 +251,7 @@ struct mortmorx
protected:
FixedVersion<>version; /* Version number of the glyph metamorphosis table.
* 1 for mort, 2 or 3 for morx. */
ULONG chainCount; /* Number of metamorphosis chains contained in this
UINT32 chainCount; /* Number of metamorphosis chains contained in this
* table. */
Chain<UINT> chains[VAR]; /* Chains. */
@ -259,12 +259,12 @@ struct mortmorx
DEFINE_SIZE_MIN (8);
};
struct mort : mortmorx<USHORT>
struct mort : mortmorx<UINT16>
{
static const hb_tag_t tableTag = HB_AAT_TAG_MORT;
};
struct morx : mortmorx<ULONG>
struct morx : mortmorx<UINT32>
{
static const hb_tag_t tableTag = HB_AAT_TAG_MORX;
};

View File

@ -160,11 +160,6 @@ static_assert (Type::min_size + 1 <= sizeof (_Null##Type), "Null pool too small.
* Dispatch
*/
#define TRACE_DISPATCH(this, format) \
hb_auto_trace_t<context_t::max_debug_depth, typename context_t::return_t> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"format %d", (int) format);
template <typename Context, typename Return, unsigned int MaxDebugDepth>
struct hb_dispatch_context_t
{