| 65 | } |
| 66 | |
| 67 | const char* MakeHostPathf(char* dst, uint32_t dst_len, const char* path_format, ...) |
| 68 | { |
| 69 | SetupFS(); |
| 70 | |
| 71 | int len = dmStrlCpy(dst, DM_HOSTFS, dst_len); |
| 72 | if (len > 0 && dst[len-1] != '/') |
| 73 | len += dmStrlCat(dst+len, "/", dst_len-len); |
| 74 | |
| 75 | va_list argp; |
| 76 | va_start(argp, path_format); |
| 77 | vsnprintf(dst+len, dst_len-len, path_format, argp); |
| 78 | va_end(argp); |
| 79 | |
| 80 | dmPath::Normalize(dst, dst, dst_len); |
| 81 | return dst; |
| 82 | } |
| 83 | |
| 84 | uint8_t* ReadFile(const char* path, uint32_t* file_size) |
| 85 | { |
no test coverage detected