summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh
index 870f123325..4c5b3c0f98 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh
@@ -42,8 +42,10 @@ namespace OT {
struct NameRecord
{
- static int cmp (const NameRecord *a, const NameRecord *b)
+ static int cmp (const void *pa, const void *pb)
{
+ const NameRecord *a = (const NameRecord *) pa;
+ const NameRecord *b = (const NameRecord *) pb;
int ret;
ret = b->platformID.cmp (a->platformID);
if (ret) return ret;
@@ -63,12 +65,12 @@ struct NameRecord
return_trace (c->check_struct (this) && c->check_range ((char *) base, (unsigned int) length + offset));
}
- USHORT platformID; /* Platform ID. */
- USHORT encodingID; /* Platform-specific encoding ID. */
- USHORT languageID; /* Language ID. */
- USHORT nameID; /* Name ID. */
- USHORT length; /* String length (in bytes). */
- USHORT offset; /* String offset from start of storage area (in bytes). */
+ UINT16 platformID; /* Platform ID. */
+ UINT16 encodingID; /* Platform-specific encoding ID. */
+ UINT16 languageID; /* Language ID. */
+ UINT16 nameID; /* Name ID. */
+ UINT16 length; /* String length (in bytes). */
+ UINT16 offset; /* String offset from start of storage area (in bytes). */
public:
DEFINE_SIZE_STATIC (12);
};
@@ -89,7 +91,7 @@ struct name
key.encodingID.set (encoding_id);
key.languageID.set (language_id);
key.nameID.set (name_id);
- NameRecord *match = (NameRecord *) bsearch (&key, nameRecord, count, sizeof (nameRecord[0]), (hb_compare_func_t) NameRecord::cmp);
+ NameRecord *match = (NameRecord *) bsearch (&key, nameRecord, count, sizeof (nameRecord[0]), NameRecord::cmp);
if (!match)
return 0;
@@ -121,9 +123,9 @@ struct name
}
/* We only implement format 0 for now. */
- USHORT format; /* Format selector (=0/1). */
- USHORT count; /* Number of name records. */
- Offset<> stringOffset; /* Offset to start of string storage (from start of table). */
+ UINT16 format; /* Format selector (=0/1). */
+ UINT16 count; /* Number of name records. */
+ Offset16 stringOffset; /* Offset to start of string storage (from start of table). */
NameRecord nameRecord[VAR]; /* The name records where count is the number of records. */
public:
DEFINE_SIZE_ARRAY (6, nameRecord);