示例#1
0
ots::TableAction BlinkOTSContext::GetTableAction(uint32_t tag)
{
#define TABLE_TAG(c1, c2, c3, c4) ((uint32_t)((((uint8_t)(c1)) << 24) | (((uint8_t)(c2)) << 16) | (((uint8_t)(c3)) << 8) | ((uint8_t)(c4))))

    const uint32_t cbdtTag = TABLE_TAG('C', 'B', 'D', 'T');
    const uint32_t cblcTag = TABLE_TAG('C', 'B', 'L', 'C');
    const uint32_t colrTag = TABLE_TAG('C', 'O', 'L', 'R');
    const uint32_t cpalTag = TABLE_TAG('C', 'P', 'A', 'L');

    switch (tag) {
    // Google Color Emoji Tables
    case cbdtTag:
    case cblcTag:
    // Windows Color Emoji Tables
    case colrTag:
    case cpalTag:
        return ots::TABLE_ACTION_PASSTHRU;
    default:
        return ots::TABLE_ACTION_DEFAULT;
    }
#undef TABLE_TAG
}
示例#2
0
文件: table.c 项目: Archs/scheme
static void primop_set_table_tag(long argc) {
    object o = *sp++;
    TYPE_CHECK(TABLE_P(o),1,"table",o);
    TABLE_TAG(o) = *sp;
}