MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_mbstowcs

Function ggml_mbstowcs

subprojects/llama.cpp/ggml/src/ggml.c:562–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560
561#ifdef _WIN32
562static wchar_t * ggml_mbstowcs(const char * mbs) {
563 int wlen = MultiByteToWideChar(CP_UTF8, 0, mbs, -1, NULL, 0);
564 if (!wlen) {
565 errno = EINVAL;
566 return NULL;
567 }
568
569 wchar_t * wbuf = GGML_MALLOC(wlen * sizeof(wchar_t));
570 wlen = MultiByteToWideChar(CP_UTF8, 0, mbs, -1, wbuf, wlen);
571 if (!wlen) {
572 GGML_FREE(wbuf);
573 errno = EINVAL;
574 return NULL;
575 }
576
577 return wbuf;
578}
579#endif
580
581FILE * ggml_fopen(const char * fname, const char * mode) {

Callers 1

ggml_fopenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected