mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(vfs_s_print_stats): get rid of static variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
69fb6b91be
commit
cb567b5ea6
@ -696,22 +696,13 @@ static void
|
|||||||
vfs_s_print_stats (const char *fs_name, const char *action,
|
vfs_s_print_stats (const char *fs_name, const char *action,
|
||||||
const char *file_name, off_t have, off_t need)
|
const char *file_name, off_t have, off_t need)
|
||||||
{
|
{
|
||||||
static const char *i18n_percent_transf_format = NULL;
|
|
||||||
static const char *i18n_transf_format = NULL;
|
|
||||||
|
|
||||||
if (i18n_percent_transf_format == NULL)
|
|
||||||
{
|
|
||||||
i18n_percent_transf_format = "%s: %s: %s %3d%% (%" PRIuMAX " %s";
|
|
||||||
i18n_transf_format = "%s: %s: %s %" PRIuMAX " %s";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (need)
|
if (need)
|
||||||
vfs_print_message (i18n_percent_transf_format, fs_name, action,
|
vfs_print_message (_("%s: %s: %s %3d%% %" PRIuMAX " %s"), fs_name, action,
|
||||||
file_name, (int) ((double) have * 100 / need), (uintmax_t) have,
|
file_name, (int) ((double) have * 100 / need), (uintmax_t) have,
|
||||||
_("bytes transferred"));
|
_("bytes transferred"));
|
||||||
else
|
else
|
||||||
vfs_print_message (i18n_transf_format, fs_name, action, file_name, (uintmax_t) have,
|
vfs_print_message (_("%s: %s: %s %" PRIuMAX " %s"), fs_name, action, file_name,
|
||||||
_("bytes transferred"));
|
(uintmax_t) have, _("bytes transferred"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user