Lines Matching refs:dict

226 static void set_inverse_transl(struct vc_data *conp, struct uni_pagedict *dict,  in set_inverse_transl()  argument
232 if (!dict) in set_inverse_transl()
234 inv = dict->inverse_translations[m]; in set_inverse_transl()
237 inv = dict->inverse_translations[m] = kmalloc(MAX_GLYPH, in set_inverse_transl()
253 static void set_inverse_trans_unicode(struct uni_pagedict *dict) in set_inverse_trans_unicode() argument
258 if (!dict) in set_inverse_trans_unicode()
261 inv = dict->inverse_trans_unicode; in set_inverse_trans_unicode()
263 inv = dict->inverse_trans_unicode = kmalloc_array(MAX_GLYPH, in set_inverse_trans_unicode()
271 u16 **dir = dict->uni_pgdir[d]; in set_inverse_trans_unicode()
426 static void con_release_unimap(struct uni_pagedict *dict) in con_release_unimap() argument
430 if (dict == dflt) in con_release_unimap()
434 u16 **dir = dict->uni_pgdir[d]; in con_release_unimap()
440 dict->uni_pgdir[d] = NULL; in con_release_unimap()
443 for (r = 0; r < ARRAY_SIZE(dict->inverse_translations); r++) { in con_release_unimap()
444 kfree(dict->inverse_translations[r]); in con_release_unimap()
445 dict->inverse_translations[r] = NULL; in con_release_unimap()
448 kfree(dict->inverse_trans_unicode); in con_release_unimap()
449 dict->inverse_trans_unicode = NULL; in con_release_unimap()
641 struct uni_pagedict *dict; in con_set_unimap() local
654 dict = *vc->uni_pagedict_loc; in con_set_unimap()
655 if (!dict) { in con_set_unimap()
660 if (dict->refcount > 1) { in con_set_unimap()
661 dict = con_unshare_unimap(vc, dict); in con_set_unimap()
662 if (IS_ERR(dict)) { in con_set_unimap()
663 err = PTR_ERR(dict); in con_set_unimap()
666 } else if (dict == dflt) { in con_set_unimap()
674 err1 = con_insert_unipair(dict, plist->unicode, plist->fontpos); in con_set_unimap()
682 if (con_unify_unimap(vc, dict)) in con_set_unimap()
686 set_inverse_transl(vc, dict, m); in con_set_unimap()
687 set_inverse_trans_unicode(dict); in con_set_unimap()
708 struct uni_pagedict *dict; in con_set_default_unimap() local
714 dict = *vc->uni_pagedict_loc; in con_set_default_unimap()
715 if (dict == dflt) in con_set_default_unimap()
720 if (dict && !--dict->refcount) { in con_set_default_unimap()
721 con_release_unimap(dict); in con_set_default_unimap()
722 kfree(dict); in con_set_default_unimap()
733 dict = *vc->uni_pagedict_loc; in con_set_default_unimap()
738 err1 = con_insert_unipair(dict, *(dfont++), fontpos); in con_set_default_unimap()
743 if (con_unify_unimap(vc, dict)) { in con_set_default_unimap()
749 set_inverse_transl(vc, dict, m); in con_set_default_unimap()
750 set_inverse_trans_unicode(dict); in con_set_default_unimap()
751 dflt = dict; in con_set_default_unimap()
789 struct uni_pagedict *dict; in con_get_unimap() local
801 dict = *vc->uni_pagedict_loc; in con_get_unimap()
802 if (!dict) in con_get_unimap()
806 u16 **dir = dict->uni_pgdir[d]; in con_get_unimap()
865 struct uni_pagedict *dict; in conv_uni_to_pc() local
883 dict = *conp->uni_pagedict_loc; in conv_uni_to_pc()
884 if (!dict) in conv_uni_to_pc()
887 dir = dict->uni_pgdir[UNI_DIR(ucs)]; in conv_uni_to_pc()