Lines Matching refs:oem
29 * Support for oem <-> unicode translations.
179 * Convert a unicode string to an oem string.
182 * or when (nbytes - 1) oem characters have been stored.
188 ucstooem(char *oem, const smb_wchar_t *ucs, size_t nbytes, uint32_t cpid)
194 if (ucs == NULL || oem == NULL)
202 *oem++ = oemchar >> 8;
203 *oem++ = (char)oemchar;
206 *oem++ = (char)oemchar;
216 *oem = '\0';
221 * Convert an oem string to a unicode string.
223 * The conversion will stop at the end of the oem string or
226 * The number of converted oem chars is returned, or 0 on error.
227 * An oem char may be either 1 or 2 bytes.
230 oemtoucs(smb_wchar_t *ucs, const char *oem, size_t nwchars, uint32_t cpid)
236 if (ucs == NULL || oem == NULL)
242 while ((oemchar = (smb_wchar_t)*oem++ & 0xff) != 0) {
248 oemchar = oemchar << 8 | (*oem++ & 0xff);
268 * Get a pointer to the oem page for the specific codepage id.
306 * Initialize the oem page in the oem table.
357 MEM_ZALLOC("oem", max_oem_index * sizeof (smb_wchar_t));
362 MEM_ZALLOC("oem", MAX_UNICODE_IDX * sizeof (smb_wchar_t));
364 MEM_FREE("oem", oemcpg->oempage.value);