Lines Matching refs:file
955 FILE *file = NULL;
969 errno_t wfopen_error = _wfopen_s(&file, filename_utf16, L"rb");
971 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to open JSON file %s", filename);
976 file = fopen(filename, "rb");
981 if (!file) {
982 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to open JSON file %s", filename);
986 // NOTE: We can't just use fseek(file, 0, SEEK_END) because that isn't guaranteed to be supported on all systems
990 fread_ret_count = fread(buffer, 1, 256, file);
991 } while (fread_ret_count == 256 && !feof(file));
992 len = ftell(file);
993 fseek(file, 0, SEEK_SET);
997 "loader_get_json: Failed to allocate space for JSON file %s buffer of length %lu", filename, len);
1001 if (fread(json_buf, sizeof(char), len, file) != len) {
1002 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read JSON file %s.", filename);
1013 // Parse text from file
1017 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Out of Memory error occurred while parsing JSON file %s.",
1022 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Invalid JSON file %s.", filename);
1028 if (NULL != file) {
1029 fclose(file);