Lines Matching refs:to

17  * cifs_mapchar() - convert a host-endian char to proper char in codepage
20 * @cp: codepage to which character should be converted
21 * @mapchar: should character be mapped according to mapchars mount option?
24 * responsibility of the caller to ensure that the target buffer is large
25 * enough to hold the result of the conversion (at least NLS_MAX_CHARSET_SIZE).
42 * BB: Cannot handle remapping UNI_SLASH until all the calls to
96 * @from: pointer to input string
101 * be after being converted to the given charset, not including any null
137 * smb_from_utf16() - convert utf16le string to local charset
138 * @to: destination buffer
142 * @codepage: codepage to which characters should be converted
143 * @mapchar: should characters be remapped according to the mapchars option?
145 * Convert a little-endian utf16le string (as sent by the server) to a string
146 * in the provided codepage. The tolen and fromlen parameters are to ensure
154 * instead of straight UTF16-2. The linux nls routines however aren't able to
160 static int smb_from_utf16(char *to, const __le16 *from, int tolen, int fromlen,
171 * because the chars can be of varying widths, we need to take care
172 * not to overflow the destination buffer when we get close to the
173 * end of it. Until we get to this offset, we don't need to check
190 * check to see if converting this character might make the
199 /* put converted char into 'to' buffer */
200 charlen = cifs_mapchar(&to[outlen], ftmp, codepage, mapchar);
208 * (2 UTF-8 pairs divided to 2 UTF-16 pairs)
219 to[outlen++] = 0;
225 * smb_strtoUTF16() - Convert character string to unicode string
226 * @to: destination buffer
229 * @codepage: codepage to which characters should be converted
233 int smb_strtoUTF16(__le16 *to, const char *from, int len,
238 wchar_t wchar_to; /* needed to quiet sparse */
240 /* special case for utf8 to handle no plane0 chars */
248 (wchar_t *)to, len);
254 * if fails fall back to UCS encoding as this
268 put_unaligned_le16(wchar_to, &to[i]);
272 put_unaligned_le16(0, &to[i]);
277 * smb_strndup_from_utf16() - copy a string from wire format to the local
284 * Take a string given by the server, convert it to the local codepage and
285 * put it in a new buffer. Returns a pointer to the new string or NULL on
322 * Convert 16 bit Unicode pathname to wire format from string in current code
328 * smbConvertToUTF16() - convert string from local charset to utf16
332 * @cp: codepage to which characters should be converted
333 * @mapchar: should characters be remapped according to the mapchars option?
335 * Convert 16 bit Unicode pathname to wire format from string in current code
383 * until all the calls to build_path_from_dentry are modified,
415 /* 1-3bytes UTF-8 to 2bytes UTF-16 */
419 * 4bytes UTF-8(surrogate pair) to 4bytes UTF-16
420 * 7-8bytes UTF-8(IVS) divided to 2 UTF-16
428 /* 5-6bytes UTF-8 to 6bytes UTF-16 */