Directory size: rename variables for consistency.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
01d6801f4e
Коммит
0fb3e0a3c7
@ -1624,7 +1624,7 @@ single_dirsize_cmd (void)
|
||||
entry = &(panel->dir.list[panel->selected]);
|
||||
if (S_ISDIR (entry->st.st_mode) && !DIR_IS_DOTDOT (entry->fname))
|
||||
{
|
||||
size_t marked = 0;
|
||||
size_t count = 0;
|
||||
uintmax_t total = 0;
|
||||
ComputeDirSizeUI *ui;
|
||||
vfs_path_t *p;
|
||||
@ -1632,7 +1632,7 @@ single_dirsize_cmd (void)
|
||||
ui = compute_dir_size_create_ui (FALSE);
|
||||
p = vfs_path_from_str (entry->fname);
|
||||
|
||||
if (compute_dir_size (p, ui, compute_dir_size_update_ui, &marked, &total, TRUE) ==
|
||||
if (compute_dir_size (p, ui, compute_dir_size_update_ui, &count, &total, TRUE) ==
|
||||
FILE_CONT)
|
||||
{
|
||||
entry->st.st_size = (off_t) total;
|
||||
@ -1671,12 +1671,12 @@ dirsizes_cmd (void)
|
||||
|| !panel->dirs_marked) && !DIR_IS_DOTDOT (panel->dir.list[i].fname))
|
||||
{
|
||||
vfs_path_t *p;
|
||||
size_t marked = 0;
|
||||
size_t count = 0;
|
||||
uintmax_t total = 0;
|
||||
gboolean ok;
|
||||
|
||||
p = vfs_path_from_str (panel->dir.list[i].fname);
|
||||
ok = compute_dir_size (p, ui, compute_dir_size_update_ui, &marked, &total,
|
||||
ok = compute_dir_size (p, ui, compute_dir_size_update_ui, &count, &total,
|
||||
TRUE) != FILE_CONT;
|
||||
vfs_path_free (p);
|
||||
|
||||
|
@ -1234,7 +1234,7 @@ panel_get_file (WPanel * panel)
|
||||
|
||||
static FileProgressStatus
|
||||
panel_compute_totals (const WPanel * panel, void *ui, compute_dir_size_callback cback,
|
||||
size_t * ret_marked, uintmax_t * ret_total, gboolean compute_symlinks)
|
||||
size_t * ret_count, uintmax_t * ret_total, gboolean compute_symlinks)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1253,7 +1253,7 @@ panel_compute_totals (const WPanel * panel, void *ui, compute_dir_size_callback
|
||||
FileProgressStatus status;
|
||||
|
||||
p = vfs_path_append_new (panel->cwd_vpath, panel->dir.list[i].fname, NULL);
|
||||
status = compute_dir_size (p, ui, cback, ret_marked, ret_total, compute_symlinks);
|
||||
status = compute_dir_size (p, ui, cback, ret_count, ret_total, compute_symlinks);
|
||||
vfs_path_free (p);
|
||||
|
||||
if (status != FILE_CONT)
|
||||
@ -1261,7 +1261,7 @@ panel_compute_totals (const WPanel * panel, void *ui, compute_dir_size_callback
|
||||
}
|
||||
else
|
||||
{
|
||||
(*ret_marked)++;
|
||||
(*ret_count)++;
|
||||
*ret_total += (uintmax_t) s->st_size;
|
||||
}
|
||||
}
|
||||
@ -2566,11 +2566,11 @@ compute_dir_size_update_ui (void *ui, const vfs_path_t * dirname_vpath, size_t d
|
||||
|
||||
FileProgressStatus
|
||||
compute_dir_size (const vfs_path_t * dirname_vpath, void *ui, compute_dir_size_callback cback,
|
||||
size_t * ret_marked, uintmax_t * ret_total, gboolean compute_symlinks)
|
||||
size_t * ret_count, uintmax_t * ret_total, gboolean compute_symlinks)
|
||||
{
|
||||
size_t dir_count = 0;
|
||||
size_t marked = 0;
|
||||
|
||||
return do_compute_dir_size (dirname_vpath, ui, cback, &dir_count, ret_marked, ret_total,
|
||||
return do_compute_dir_size (dirname_vpath, ui, cback, ret_count, &marked, ret_total,
|
||||
compute_symlinks);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ FileProgressStatus file_error (const char *format, const char *file);
|
||||
/* return value is FILE_CONT or FILE_ABORT */
|
||||
FileProgressStatus compute_dir_size (const vfs_path_t * dirname_vpath, void *ui,
|
||||
compute_dir_size_callback cback,
|
||||
size_t * ret_marked, uintmax_t * ret_total,
|
||||
size_t * ret_count, uintmax_t * ret_total,
|
||||
gboolean compute_symlinks);
|
||||
|
||||
ComputeDirSizeUI *compute_dir_size_create_ui (gboolean allow_skip);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user