Lines Matching refs:wchar

155 int dos_to_wchar(doscp_t *cp, const char *dos, wchar_t *wchar, size_t len)  in dos_to_wchar()  argument
160 wchar_t *dptr=wchar; in dos_to_wchar()
167 return dptr-wchar; in dos_to_wchar()
175 static int safe_iconv(iconv_t conv, const wchar_t *wchar, char *dest, in safe_iconv() argument
186 r=iconv(conv, (char**)&wchar, &in_len, &dptr, &out_len); in safe_iconv()
200 wchar++; in safe_iconv()
219 wchar_t *wchar, char *dos, size_t len, int *mangled) in wchar_to_dos() argument
221 safe_iconv(cp->to, wchar, dos, len, len, mangled); in wchar_to_dos()
272 int dos_to_wchar(doscp_t *cp, const char *dos, wchar_t *wchar, size_t len) in dos_to_wchar() argument
279 wchar[i] = c; in dos_to_wchar()
281 wchar[i] = cp->from_dos[c & 0x7f]; in dos_to_wchar()
284 wchar[i] = '\0'; in dos_to_wchar()
290 wchar_t *wchar, char *dos, size_t len, int *mangled) in wchar_to_dos() argument
293 for(i=0; i<len && wchar[i]; i++) { in wchar_to_dos()
294 char c = wchar[i]; in wchar_to_dos()
367 int wchar_to_native(const wchar_t *wchar, char *native, size_t len, in wchar_to_native() argument
374 len = wcsnlen(wchar,len); in wchar_to_native()
375 r=safe_iconv(to_native, wchar, native, len, out_len, &mangled); in wchar_to_native()
383 for(i=0; i<len && wchar[i] != 0; i++) { in wchar_to_native()
384 int r = wcrtomb(dptr, wchar[i], &ps); in wchar_to_native()
403 int native_to_wchar(const char *native, wchar_t *wchar, size_t len, in native_to_wchar() argument
411 int r = mbrtowc(wchar+i, native, len, &ps); in native_to_wchar()
419 wchar[i] = c & 0xff; in native_to_wchar()
421 wchar[i] = '_'; in native_to_wchar()
431 wchar[i]='\0'; in native_to_wchar()