diff --git a/src/xz/main.c b/src/xz/main.c index ca8a4680..90bb69fd 100644 --- a/src/xz/main.c +++ b/src/xz/main.c @@ -156,7 +156,8 @@ main(int argc, char **argv) // Set up the locale and message translations. tuklib_gettext_init(PACKAGE, LOCALEDIR); - // Initialize handling of error/warning/other messages. + // Initialize progress message handling. It's not always needed + // but it's simpler to do this unconditionally. message_init(); // Set hardware-dependent default values. These can be overridden diff --git a/src/xz/message.c b/src/xz/message.c index 064a0450..c7c24dce 100644 --- a/src/xz/message.c +++ b/src/xz/message.c @@ -42,7 +42,7 @@ static bool current_filename_printed = false; /// True if we should print progress indicator and update it automatically /// if also verbose >= V_VERBOSE. -static bool progress_automatic; +static bool progress_automatic = false; /// True if message_progress_start() has been called but /// message_progress_end() hasn't been called yet. diff --git a/src/xz/message.h b/src/xz/message.h index d7af1cd9..bed9cbd4 100644 --- a/src/xz/message.h +++ b/src/xz/message.h @@ -24,7 +24,10 @@ enum message_verbosity { extern const int message_progress_sigs[]; -/// \brief Initializes the message functions +/// \brief Initializes the progress message functions +/// +/// message_fatal() and such can be called even before message_init() +/// has been called. /// /// If an error occurs, this function doesn't return. ///