Lines Matching refs:mp

71 	struct msg_pack	*mp, omp;
85 mp = memset(&omp, 0, sizeof (omp)); /* msg pack */
169 mp->msgid1 = msgid1;
170 mp->msgid2 = msgid2;
171 mp->msgfile = msgfile;
172 mp->domain = cur_domain;
173 mp->binding = cur_domain_binding;
174 mp->locale = cur_locale;
175 mp->language = language;
176 mp->domain_len = cur_domain_len;
177 mp->n = n;
178 mp->category = category;
179 mp->plural = plural;
180 mp->hash_domain = hash_domain;
211 mp->nlsp = 1;
228 (void) memcpy(mp->msgfile, cb, cblen);
229 *(mp->msgfile + cblen) = '\0';
239 result = handle_mo(mp);
246 mp->nlsp = 0;
247 mp->binding = cur_domain_binding;
253 ret_msg = handle_lang(mp);
261 mp->locale = cur_locale;
262 mp->status = 0;
269 *mp->msgfile = '\0';
271 if (mk_msgfile(mp) == NULL) {
276 result = handle_mo(mp);
974 handle_type_mo(Msg_node *mnp, struct msg_pack *mp)
984 mp->status |= ST_SUN_MO_FOUND;
986 if (mp->plural) {
991 int exp = (mp->n == 1);
992 result = (char *)mp->msgid1;
994 result = (char *)mp->msgid2;
997 result = key_2_text(mnp->msg.sunmsg, mp->msgid1);
999 result = check_format(mp->msgid1, result, 0);
1004 mp->status |= ST_GNU_MO_FOUND;
1007 get_codeset(mp->domain), mp);
1009 if (result == mp->msgid1 || result == mp->msgid2) {
1015 mp->status |= ST_GNU_MSG_FOUND;
1018 result = check_format(mp->msgid1, result, 0);
1019 if (result == mp->msgid1) {
1020 DFLTMSG(result, mp->msgid1, mp->msgid2,
1021 mp->n, mp->plural);
1027 DFLTMSG(result, mp->msgid1, mp->msgid2, mp->n, mp->plural);
1037 handle_mo(struct msg_pack *mp)
1051 gprintf(0, "*************** handle_mo(0x%p)\n", (void *)mp);
1052 printmp(mp, 1);
1055 mnp = check_cache(mp);
1059 return (handle_type_mo(mnp, mp));
1067 DFLTMSG(result, mp->msgid1, mp->msgid2, mp->n, mp->plural);
1070 mnp->hashid = mp->hash_domain;
1071 mnp->path = strdup(mp->msgfile);
1074 DFLTMSG(result, mp->msgid1, mp->msgid2, mp->n, mp->plural);
1078 fd = nls_safe_open(mp->msgfile, &statbuf, &mp->trusted, !mp->nlsp);
1086 mp->fsz = (size_t)statbuf.st_size;
1087 mp->addr = mmap(NULL, mp->fsz, PROT_READ, MAP_SHARED, fd, 0);
1090 if (mp->addr == MAP_FAILED) {
1093 DFLTMSG(result, mp->msgid1, mp->msgid2, mp->n, mp->plural);
1097 if (setmsg(mnp, (char *)mp->addr, mp->fsz) == -1) {
1100 (void) munmap(mp->addr, mp->fsz);
1101 DFLTMSG(result, mp->msgid1, mp->msgid2, mp->n, mp->plural);
1104 mnp->trusted = mp->trusted;
1107 return (handle_type_mo(mnp, mp));