KeyID OSXKeyState::CUCHRKeyResource::getKey(UInt32 table, UInt32 button) const { assert(table < getNumTables()); assert(button < getNumButtons()); const UInt8* base = reinterpret_cast<const UInt8*>(m_resource); const UCKeyOutput* cPtr = reinterpret_cast<const UCKeyOutput*>(base + m_cti->keyToCharTableOffsets[table]); const UCKeyOutput c = cPtr[button]; KeySequence keys; switch (c & kUCKeyOutputTestForIndexMask) { case kUCKeyOutputStateIndexMask: if (!getDeadKey(keys, c & kUCKeyOutputGetIndexMask)) { return kKeyNone; } break; case kUCKeyOutputSequenceIndexMask: default: if (!addSequence(keys, c)) { return kKeyNone; } break; } // XXX -- no support for multiple characters if (keys.size() != 1) { return kKeyNone; } return keys.front(); }
int NDBT_Tables::printAll(){ for (int i=0; i < getNumTables(); i++){ const NdbDictionary::Table* tab = getTable(i); if (tab == NULL){ abort(); } ndbout << (* (NDBT_Table*)tab) << endl; } return NDBT_OK; }