Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/BLI_filelist.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| char r_size[FILELIST_DIRENTRY_SIZE_LEN]) | char r_size[FILELIST_DIRENTRY_SIZE_LEN]) | ||||
| { | { | ||||
| /* | /* | ||||
| * Seems st_size is signed 32-bit value in *nix and Windows. This | * Seems st_size is signed 32-bit value in *nix and Windows. This | ||||
| * will buy us some time until files get bigger than 4GB or until | * will buy us some time until files get bigger than 4GB or until | ||||
| * everyone starts using __USE_FILE_OFFSET64 or equivalent. | * everyone starts using __USE_FILE_OFFSET64 or equivalent. | ||||
| */ | */ | ||||
| double size = (double)(st ? st->st_size : sz); | double size = (double)(st ? st->st_size : sz); | ||||
| #ifdef WIN32 | |||||
| BLI_str_format_byte_unit(r_size, size, false); | |||||
| #else | |||||
| BLI_str_format_byte_unit(r_size, size, true); | BLI_str_format_byte_unit(r_size, size, true); | ||||
| #endif | |||||
| } | } | ||||
| /** | /** | ||||
| * Convert given entry's modes into human-readable strings. | * Convert given entry's modes into human-readable strings. | ||||
| */ | */ | ||||
| void BLI_filelist_entry_mode_to_string(const struct stat *st, | void BLI_filelist_entry_mode_to_string(const struct stat *st, | ||||
| const bool UNUSED(compact), | const bool UNUSED(compact), | ||||
| char r_mode1[FILELIST_DIRENTRY_MODE_LEN], | char r_mode1[FILELIST_DIRENTRY_MODE_LEN], | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||