141: /* change keytable, too */
142: if ( keytabsz < offsetof(KeyTab, kct)
143: || !(keytab->keymax > 0 && keytab->keymax <= KEYMAX)
145: || !(keytabsz >= keytab->keymax * keytab->kctmax * sizeof(UH)
146: + offsetof(KeyTab, kct)) )
147: { err = E_PAR; goto err_ret; }
156: kbdef = Vrealloc(kbdef,
157: offsetof(KbDef, keyDef.keytab) + keytabsz);
158: if ( kbdef == NULL ) { err = E_NOMEM; goto err_ret; }
159: kbdef->size = offsetof(KeyDef, keytab) + keytabsz;
160: SetKbDef(kbsel, kid, kbdef);
183:
184: if ( datacnt >= offsetof(KeyDef, keytab.kctmax)
185: && keydef->keytab.keymax == 0 ) {
193: /* set */
194: if ( (datacnt -= offsetof(KeyDef, keytab)) < 0 )
195: return E_PAR;
376: addr = &kbdef->keyDef.keytab;
377: size = kbdef->size - offsetof(KeyDef, keytab);
378: break;
462: size = ( kbdef == NULL )?
463: 0: kbdef->size - offsetof(KeyDef, keytab);
464: break;