Converting logging to ASCII and other Windows fixes.
This commit is contained in:
@@ -83,3 +83,27 @@ size_t xe_file_read(xe_file_ref file, const size_t offset,
|
||||
|
||||
return fread(buffer, 1, buffer_size, handle);
|
||||
}
|
||||
|
||||
void xe_path_join(const xechar_t* left, const xechar_t* right,
|
||||
xechar_t* out_path, size_t out_path_size) {
|
||||
#if XE_WCHAR
|
||||
xesnprintf(out_path, out_path_size, XT("%ls%c%ls"),
|
||||
left, XE_PATH_SEPARATOR, right);
|
||||
#else
|
||||
xesnprintf(out_path, out_path_size, XT("%s%c%s"),
|
||||
left, XE_PATH_SEPARATOR, right);
|
||||
#endif // XE_WCHAR
|
||||
}
|
||||
|
||||
void xe_path_get_absolute(const xechar_t* path, xechar_t* out_abs_path,
|
||||
size_t abs_path_size) {
|
||||
#if XE_PLATFORM(WIN32)
|
||||
#if XE_WCHAR
|
||||
_wfullpath(out_abs_path, path, abs_path_size);
|
||||
#else
|
||||
_fullpath(out_abs_path, path, abs_path_size);
|
||||
#endif // XE_WCHAR
|
||||
#else
|
||||
realpath(path, out_abs_path);
|
||||
#endif // WIN32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user