MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__fopen

Function stbi__fopen

include/stb/stb_image.h:1337–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335#endif
1336
1337static FILE *stbi__fopen(char const *filename, char const *mode)
1338{
1339 FILE *f;
1340#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
1341 wchar_t wMode[64];
1342 wchar_t wFilename[1024];
1343 if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename)))
1344 return 0;
1345
1346 if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode)))
1347 return 0;
1348
1349#if defined(_MSC_VER) && _MSC_VER >= 1400
1350 if (0 != _wfopen_s(&f, wFilename, wMode))
1351 f = 0;
1352#else
1353 f = _wfopen(wFilename, wMode);
1354#endif
1355
1356#elif defined(_MSC_VER) && _MSC_VER >= 1400
1357 if (0 != fopen_s(&f, filename, mode))
1358 f=0;
1359#else
1360 f = fopen(filename, mode);
1361#endif
1362 return f;
1363}
1364
1365
1366STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)

Callers 6

stbi_loadFunction · 0.85
stbi_load_16Function · 0.85
stbi_loadfFunction · 0.85
stbi_is_hdrFunction · 0.85
stbi_infoFunction · 0.85
stbi_is_16_bitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected