mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Update libaaf to v1.0-22-gfab4651
This commit is contained in:
parent
0054078289
commit
ae18524da7
10 changed files with 346 additions and 156 deletions
|
|
@ -513,6 +513,43 @@ laaf_util_file_exists (const char* filepath)
|
|||
return 0;
|
||||
}
|
||||
|
||||
FILE*
|
||||
laaf_util_fopen_utf8 (const char* filepath, const char* mode)
|
||||
{
|
||||
FILE* fp = NULL;
|
||||
|
||||
if (!filepath) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
wchar_t* wfile = laaf_util_windows_utf8toutf16 (filepath);
|
||||
|
||||
if (!wfile) {
|
||||
// error( "Unable to convert filepath to wide string : %s", cfbd->file );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const wchar_t* wmode = NULL;
|
||||
|
||||
if (strcmp (mode, "rb") == 0) {
|
||||
wmode = L"rb";
|
||||
} else if (strcmp (mode, "wb") == 0) {
|
||||
wmode = L"wb";
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fp = _wfopen (wfile, wmode);
|
||||
|
||||
free (wfile);
|
||||
#else
|
||||
fp = fopen (filepath, mode);
|
||||
#endif
|
||||
|
||||
return fp;
|
||||
}
|
||||
|
||||
static int
|
||||
utf8CodeLen (const uint16_t* u16Code)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue