Lines Matching refs:domain
765 _nl_init_domain_conv (domain_file, domain, domainbinding)
767 struct loaded_domain *domain;
779 domain->codeset_cntr =
782 domain->conv = (__gconv_t) -1;
785 domain->conv = (iconv_t) -1;
788 domain->conv_tab = NULL;
843 if (__gconv_open (outcharset, charset, &domain->conv,
846 domain->conv = (__gconv_t) -1;
863 domain->conv = iconv_open (outcharset, charset);
869 domain->conv = iconv_open (outcharset, charset);
884 _nl_free_domain_conv (domain)
885 struct loaded_domain *domain;
887 if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
888 free (domain->conv_tab);
891 if (domain->conv != (__gconv_t) -1)
892 __gconv_close (domain->conv);
895 if (domain->conv != (iconv_t) -1)
896 iconv_close (domain->conv);
918 struct loaded_domain *domain;
1018 domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
1019 if (domain == NULL)
1021 domain_file->data = domain;
1023 domain->data = (char *) data;
1024 domain->use_mmap = use_mmap;
1025 domain->mmap_size = size;
1026 domain->must_swap = data->magic != _MAGIC;
1027 domain->malloced = NULL;
1030 revision = W (domain->must_swap, data->revision);
1035 domain->nstrings = W (domain->must_swap, data->nstrings);
1036 domain->orig_tab = (const struct string_desc *)
1037 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
1038 domain->trans_tab = (const struct string_desc *)
1039 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
1040 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
1041 domain->hash_tab =
1042 (domain->hash_size > 2
1044 ((char *) data + W (domain->must_swap, data->hash_tab_offset))
1046 domain->must_swap_hash_tab = domain->must_swap;
1052 domain->n_sysdep_strings = 0;
1053 domain->orig_sysdep_tab = NULL;
1054 domain->trans_sysdep_tab = NULL;
1061 if (domain->hash_tab == NULL)
1066 W (domain->must_swap, data->n_sysdep_strings);
1083 W (domain->must_swap, data->n_sysdep_segments);
1086 + W (domain->must_swap, data->sysdep_segments_offset));
1093 + W (domain->must_swap, sysdep_segments[i].offset);
1095 W (domain->must_swap, sysdep_segments[i].length);
1108 + W (domain->must_swap, data->orig_sysdep_tab_offset));
1111 + W (domain->must_swap, data->trans_sysdep_tab_offset));
1117 + domain->hash_size * sizeof (nls_uint32);
1123 + W (domain->must_swap,
1130 if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
1135 need += W (domain->must_swap, p->segsize);
1137 sysdepref = W (domain->must_swap, p->sysdepref);
1159 domain->malloced = mem;
1165 mem += domain->hash_size * sizeof (nls_uint32);
1173 + W (domain->must_swap,
1179 + W (domain->must_swap, sysdep_string->offset);
1187 if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END)
1191 W (domain->must_swap, p->segsize);
1201 W (domain->must_swap, p->segsize);
1203 W (domain->must_swap, p->sysdepref);
1227 for (i = 0; i < domain->hash_size; i++)
1229 W (domain->must_swap_hash_tab, domain->hash_tab[i]);
1234 nls_uint32 idx = hash_val % domain->hash_size;
1235 nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
1242 inmem_hash_tab[idx] = 1 + domain->nstrings + i;
1246 if (idx >= domain
1247 idx -= domain->hash_size - incr;
1255 domain->n_sysdep_strings = n_sysdep_strings;
1256 domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
1257 domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
1259 domain->hash_tab = inmem_hash_tab;
1260 domain->must_swap_hash_tab = 0;
1264 domain->n_sysdep_strings = 0;
1265 domain->orig_sysdep_tab = NULL;
1266 domain->trans_sysdep_tab = NULL;
1276 if (domain->malloced)
1277 free (domain->malloced);
1284 free (domain);
1290 the file is encoded with (found in the header entry) to the domain's
1292 nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
1295 EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
1302 _nl_unload_domain (domain)
1303 struct loaded_domain *domain;
1305 if (domain->plural != &__gettext_germanic_plural)
1306 __gettext_free_exp (domain->plural);
1308 _nl_free_domain_conv (domain);
1310 if (domain->malloced)
1311 free (domain->malloced);
1314 if (domain->use_mmap)
1315 munmap ((caddr_t) domain->data, domain->mmap_size);
1318 free ((void *) domain->data);
1320 free (domain);