| 44 | } |
| 45 | |
| 46 | size_t kwsysEncoding_wcstombs(char* dest, wchar_t const* str, size_t n) |
| 47 | { |
| 48 | if (str == 0) { |
| 49 | return (size_t)-1; |
| 50 | } |
| 51 | #ifdef _WIN32 |
| 52 | return WideCharToMultiByte(KWSYS_ENCODING_DEFAULT_CODEPAGE, 0, str, -1, dest, |
| 53 | (int)n, NULL, NULL) - |
| 54 | 1; |
| 55 | #else |
| 56 | return wcstombs(dest, str, n); |
| 57 | #endif |
| 58 | } |
| 59 | |
| 60 | char* kwsysEncoding_DupToNarrow(wchar_t const* str) |
| 61 | { |
no outgoing calls
searching dependent graphs…