Home | History | Annotate | Download | only in xdgmime

Lines Matching refs:source

61 _xdg_utf8_to_ucs4(const char *source)
64 if( ! ( *source & 0x80 ) )
66 ucs32 = *source;
72 if ( ! (*source & 0x40) )
74 ucs32 = *source;
78 if ( ! (*source & 0x20) )
80 result = *source++ & 0x1F;
83 else if ( ! (*source & 0x10) )
85 result = *source++ & 0x0F;
88 else if ( ! (*source & 0x08) )
90 result = *source++ & 0x07;
93 else if ( ! (*source & 0x04) )
95 result = *source++ & 0x03;
98 else if ( ! (*source & 0x02) )
100 result = *source++ & 0x01;
105 result = *source++;
112 result |= *source++ & 0x3F;
124 _xdg_ucs4_to_lower (xdg_unichar_t source)
128 if ((source & 0xFF) == source)
129 return (xdg_unichar_t) tolower ((unsigned char) source);
130 return source;
134 _xdg_utf8_validate (const char *source)
157 _xdg_convert_to_ucs4 (const char *source, int *len)
163 out = malloc (sizeof (xdg_unichar_t) * (strlen (source) + 1));
165 p = source;
179 _xdg_reverse_ucs4 (xdg_unichar_t *source, int len)
186 c = source[i];
187 source[i] = source[len - i - 1];
188 source[len - i - 1] = c;