• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/packages/libid3tag-0.15.0b/

Lines Matching refs:ucs4

32 # include "ucs4.h"
36 * DESCRIPTION: return the number of ucs4 chars represented by a utf16 string
73 * DESCRIPTION: duplicate and decode a utf16 string into ucs4
77 id3_ucs4_t *ucs4;
79 ucs4 = malloc((id3_utf16_length(utf16) + 1) * sizeof(*ucs4));
80 if (ucs4)
81 id3_utf16_decode(utf16, ucs4);
83 return release(ucs4);
88 * DESCRIPTION: decode a series of utf16 chars into a single ucs4 char
90 id3_length_t id3_utf16_decodechar(id3_utf16_t const *utf16, id3_ucs4_t *ucs4)
96 *ucs4 = utf16[0];
101 *ucs4 = (((utf16[0] & 0x03ffL) << 10) |
112 * DESCRIPTION: encode a single ucs4 char into a series of up to 2 utf16 chars
114 id3_length_t id3_utf16_encodechar(id3_utf16_t *utf16, id3_ucs4_t ucs4)
116 if (ucs4 < 0x00010000L) {
117 utf16[0] = ucs4;
121 else if (ucs4 < 0x00110000L) {
122 ucs4 -= 0x00010000L;
124 utf16[0] = ((ucs4 >> 10) & 0x3ff) | 0xd800;
125 utf16[1] = ((ucs4 >> 0) & 0x3ff) | 0xdc00;
137 * DESCRIPTION: decode a complete utf16 string into a ucs4 string
139 void id3_utf16_decode(id3_utf16_t const *utf16, id3_ucs4_t *ucs4)
142 utf16 += id3_utf16_decodechar(utf16, ucs4);
143 while (*ucs4++);
148 * DESCRIPTION: encode a complete ucs4 string into a utf16 string
150 void id3_utf16_encode(id3_utf16_t *utf16, id3_ucs4_t const *ucs4)
153 utf16 += id3_utf16_encodechar(utf16, *ucs4);
154 while (*ucs4++);
215 * DESCRIPTION: serialize a ucs4 string using utf16 encoding
217 id3_length_t id3_utf16_serialize(id3_byte_t **ptr, id3_ucs4_t const *ucs4,
227 while (*ucs4) {
228 switch (id3_utf16_encodechar(out = utf16, *ucs4++)) {
243 * DESCRIPTION: deserialize a ucs4 string using utf16 encoding
250 id3_ucs4_t *ucs4;
279 ucs4 = malloc((id3_utf16_length(utf16) + 1) * sizeof(*ucs4));
280 if (ucs4)
281 id3_utf16_decode(utf16, ucs4);
285 return ucs4;