mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
Fri Dec 25 20:19:57 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* file.c (panel_operate_flags): Don't change file progress count and size twice for every file. (panel_compute_totals): Initialize return values to zero before calculating anything. (panel_operate_def, panel_operate): return a value
This commit is contained in:
parent
23cc8d469c
commit
677cea13fd
@ -1,3 +1,13 @@
|
||||
Fri Dec 25 20:19:57 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* file.c (panel_operate_flags): Don't change file progress count and
|
||||
size twice for every file.
|
||||
|
||||
(panel_compute_totals): Initialize return values to zero before
|
||||
calculating anything.
|
||||
|
||||
(panel_operate_def, panel_operate): return a value
|
||||
|
||||
Thu Dec 24 19:00:05 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* screen.c (recalculate_panel_summary): new function which recalculates
|
||||
|
10
src/file.c
10
src/file.c
@ -1636,6 +1636,9 @@ panel_compute_totals (WPanel *panel, long *ret_marked, double *ret_total)
|
||||
{
|
||||
int i;
|
||||
|
||||
*ret_marked = 0;
|
||||
*ret_total = 0.0;
|
||||
|
||||
for (i = 0; i < panel->count; i++){
|
||||
struct stat *s;
|
||||
|
||||
@ -1972,12 +1975,9 @@ panel_operate_flags (void *source_panel, FileOperation operation, char *thedefau
|
||||
if (value == FILE_CONT)
|
||||
do_file_mark (panel, i, 0);
|
||||
|
||||
count++;
|
||||
|
||||
if (file_progress_show_count (count, file_progress_count) == FILE_ABORT)
|
||||
goto clean_up;
|
||||
|
||||
bytes += src_stat.st_size;
|
||||
if (verbose &&
|
||||
file_progress_show_bytes (bytes, file_progress_bytes) == FILE_ABORT)
|
||||
goto clean_up;
|
||||
@ -2040,13 +2040,13 @@ panel_operate_flags (void *source_panel, FileOperation operation, char *thedefau
|
||||
int
|
||||
panel_operate_def (void *source_panel, FileOperation operation, char *thedefault)
|
||||
{
|
||||
panel_operate_flags (source_panel, operation, thedefault, FALSE);
|
||||
return panel_operate_flags (source_panel, operation, thedefault, FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
panel_operate (void *source_panel, FileOperation operation, char *thedefault)
|
||||
{
|
||||
panel_operate_flags (source_panel, operation, thedefault, TRUE);
|
||||
return panel_operate_flags (source_panel, operation, thedefault, TRUE);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user